wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

turtle functions

Total questions: 15

Worksheet time: 10mins

Name
Class
Date
1.

How do I get my turtle to move forward?

4 lines
2.

How do I get my turtle to turn to the right?

4 lines
3.

What is SYNTAX ?

a)

Syntax is a breath mint

b)

Syntax is a command like t.forward(100)

c)

Syntax is like grammar for our code

d)

Syntax is has nothing to do with programming

4.

Which part of this statement is a variable?

t = turtle.Turtle()

a)

turtle

b)

Turtle

c)

t

d)

.

5.

Which parts of this statement are variables?

x = 7 + xPos

a)

7

b)

X

c)

xPos

d)

both X and xPos are variables

6.

What does the variable named i equal?

i = 400

c = 7

i = i + c

a)

7

b)

700

c)

407

d)

400

7.

What is a function?

a)

A function is a set of instructions that you can call anytime in your code.

b)

A function is like a variable but with more commands attached to it.

c)

A function is a new restaurant on the upper west side.

d)

A function makes my code loop.

8.

What keyword starts a function definition?

a)

for

b)

def

c)

DEF

d)

while

e)

FOR

9.

I want to make a function to make a triangle. Which option is best for that function definition?

a)

def triangle():

b)

def make_triangle:

c)

def pancakes():

d)

def tri

10.

Do we need indent our code after we define a function?

a)

yes

b)

no

11.

Who thinks about snakes when I say "let's do some python"?

a)

I do

b)

I don't

c)

I like turtles

12.

What does calling a function mean?

4 lines
13.

how many times will this for loop run?

for i in range(40)

a)

twice

b)

0 times

c)

40 times

d)

100 times

14.

How long will this for loop run?

for color in colors:

a)

100 times

b)

infinitely

c)

As many times as there are items in the list colors

d)

40 times

15.

Do you need to indent after you start your for loop?

a)

No

b)

Yes