Python turtle Flashcards

to know the commands for my python turtle test.

1
Q

Whats the first command you type when doing turtle?

A

import turtle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you set up the window?

A

wn=turtle.Screen( )

remember the capital S and the brackets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do set the background colour?

A

wn.bgcolor(“green”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you give the window a title?

A

wn.title (“ TITLE INSERT HERE “)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How would you create a turtle named Tim?

A

Tim=turtle.Turtle( )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How would you create a turtle named Tess?

A

Tess=turtle.Turtle( )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can i make tess Green?

A

tess.color (“green”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can i change the size of Tess?

A

tess.pensize(“ eg 20”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do i make tess a turtle?

A

tess.shape(“turtle”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

how can i move tess forward?

A

tess.forward( 100)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

how can i move tess right/left

A

tess.right/left (360/number of sides of shape)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

whats the command to make a loop of movements?

A

for myMoves in range ( ):

put number of times to repeat in the bracket.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how can you get the program to ask how many sides you want a shape to have?

A
numsides = int(input("How many sides would you like your
shape to have (3-20)? "))
shape_name = "shape with many sides"
if numsides == 3:
 shape_name = "triangle"
if numsides == 4:
How well did you know this?
1
Not at all
2
3
4
5
Perfectly