ponderm's Turtle Exercise

by Maddy

21 May 2018

Here’s the program I’m embedding:

I ran into the issue of getting a black screen when I was trying to color the background. I originally had it written as myscreen.bgcolor("tina_background"), but I eventually figured out that doing this is like putting quotes around a string that already has quotes (e.g. “ “green” “). Since tina_background is a variable that is input as a string value, you don’t need to add the quotes.

# I was unsure whether the center of the circle was placed on coordinate (0,0) or if the bottom of the circle was on coordinate (0,0)
# To find out I just put several circles right on top of each other.
tina.penup()
tina.goto(0,0)
tina.pendown()
tina.circle(5)
tina.circle(10)
tina.circle(15)
tina.circle(20)
tina.circle(25)
tina.circle(30)
tina.circle(35)
tina.circle(40)
tina.circle(45)
tina.circle(50)
# Turns out the circle is not centered around coordinate (0,0).

Here’s an example of what the completed exercise looks like:

screen shot 2018-05-21 at 7 53 52 pm

Maddy is a Professional Science Master's student at UNC-Chapel Hill studying Biomedical & Health Informatics. Find Maddy on Twitter, Github, and on the web.