Default size of Tracy's world
200 x 200 pixels
How do we move the Turtle 50 "pixels" forward?
forward(50)
What shape does this code draw?
forward(50)
right(90)
forward(50)
right(90)
forward(50)
right(90)
forward(50)
right(90)
A square
What can we use that allows us to repeat code multiple times?
A for loop!
What school are we from?
* Ballard
* Butler
* Zoom University
* DuBois
DuBois
How many pixels does Tracy move at a time?
Any number of pixels! It depends on how we program her.
How do we turn the Turtle right, 175 degrees?
right(175)
Time to draw a Square with a loop! Fill in the blank:
____ i in range(___):
forward(50)
right(___)
for i in range(4):
bob.forward(50)
bob.right(90)
If we want to write comments in Python what can we write as the first character?
"#"
How can we change the speed that the Turtle draws?
speed(50)
What angle does Tracy turn at a time?
Any angle. It depends how we program her.
What commands can we use to create 10 circles 10 pixels in radius that are 20 pixels apart?
for i in range(10):
circle(10)
forward(20)
What command would we write to change the color of the turtle to red?
color("red")
In Python, how can we comment out multiple lines?
"""
this is a multi
line comment
"""
When drawing "Spirals" what shape do we repeat over and over to get the spiral shape?
A circle
Command to make Tracy start drawing
pendown()
What command(s) can we use that moves the turtle backward 50 units?
backward(50) OR
right(180) forward(50) OR
left(180) forward(50) OR
What three commands can we use to move the turtle without drawing on the screen?
penup() Lifts Turtle off screen
goto(x, y) Moves turtle to x, y
pendown() Puts Turtle on screen
You write the function name with "()", e.g.,
function_name()
How do we tell Python what lines of code we want in a for loop?
Indentation!
Where on the screen does the Turtle start off and what direction does it face?
What command allows us to reset the Turtle location to be at the center of the screen?
goto(0, 0)
OR
home() allows us to set turtle to center
What shape does this draw?
for i in range(5):
bob.forward(100)
bob.right(144)
A star!
True/False: In Python the variables must be named with lower-case letters ONLY
False: they can be named with mixed case letters
Python looks similar to Binary code
FALSE. Python is much more readable than Binary code