Font size
Worksheetsturtle functions
Total questions: 15
Worksheet time: 10mins
How do I get my turtle to move forward?
How do I get my turtle to turn to the right?
What is SYNTAX ?
Syntax is a breath mint
Syntax is a command like t.forward(100)
Syntax is like grammar for our code
Syntax is has nothing to do with programming
Which part of this statement is a variable?
t = turtle.Turtle()
turtle
Turtle
t
.
Which parts of this statement are variables?
x = 7 + xPos
7
X
xPos
both X and xPos are variables
What does the variable named i equal?
i = 400
c = 7
i = i + c
7
700
407
400
What is a function?
A function is a set of instructions that you can call anytime in your code.
A function is like a variable but with more commands attached to it.
A function is a new restaurant on the upper west side.
A function makes my code loop.
What keyword starts a function definition?
for
def
DEF
while
FOR
I want to make a function to make a triangle. Which option is best for that function definition?
def triangle():
def make_triangle:
def pancakes():
def tri
Do we need indent our code after we define a function?
yes
no
Who thinks about snakes when I say "let's do some python"?
I do
I don't
I like turtles
What does calling a function mean?
how many times will this for loop run?
for i in range(40)
twice
0 times
40 times
100 times
How long will this for loop run?
for color in colors:
100 times
infinitely
As many times as there are items in the list colors
40 times
Do you need to indent after you start your for loop?
No
Yes
