Every Single Python Answer
Every Single Python Answer
for x in range(5):
circle(35)
forward(40)
penup()
backward(200)
pendown()
for x in range(4):
forward(50)
penup()
forward(50)
pendown()
1.2.5 - Caterpillar:
penup()
forward(20)
pendown()
for x in range(5):
circle(20)
penup()
forward(40)
pendown()
2.1.5 - Rectangle:
for x in range(2):
forward(50)
left(90)
forward(100)
left(90)
2.1.6 - Columns:
penup()
backward(100)
left(90)
backward(200)
pendown()
for x in range(0, 2):
forward(400)
penup()
right(90)
forward(100)
right(90)
pendown()
forward(400)
left(180)
forward(400)
right(90)
forward(100)
penup()
backward(100)
left(90)
backward(200)
pendown()
for x in range(0, 2):
forward(400)
penup()
right(90)
forward(100)
right(90)
pendown()
forward(400)
left(180)
forward(400)
right(90)
forward(100)
2.3.5 - Hexagon:
left(45)
for x in range(0, 4):
forward(100)
backward(100)
left(90)
penup()
setposition(-200,-200)
for x in range(0, 3):
penup()
forward(100)
pendown()
circle(50)
penup()
left(90)
forward(200)
left(90)
forward(50)
for x in range(0, 2):
pendown()
circle(50)
penup()
forward(100)
left(180)
forward(150)
pendown()
circle(50)
QUIZZES:
Where does Tracy always start in the grid world? : At the (0,0) coordinate in the
middle of the canvas
What are the dimensions of Tracy’s world? : 400x400 pixels
Which commands would move Tracy forward 100 pixels? : A & B
How far does Tracy need to move from the starting position to reach the right side
of the canvas? : 200 pixels
If you want Tracy to move forward 100 pixels without making a line, what set of
commands should you write? : (Since answer is multi-lined, it is written directly
below the question)
penup()
forward(100)
Which of the following is NOT a reason for loops are useful when writing code? :
Loops let us make shapes of multiple sizes
The following loop draws 3 circles on the screen. If I wanted to alter this loop to
draw 10 circles, how many lines would my code be? : 3 lines
If Tracy starts at the left edge of the canvas and moves forward 50 pixels, how
many times will this code need to be repeated to have Tracy reach the right edge of
the canvas? : 8 times
Which lines of the code below will be repeated 4 times? : 3, 4, and 5
Why do certain words change color in Python? : To show that they are recognized as
key words
If I use the command right(180), which way will Tracy turn? : She will turn around
The setposition() command moves Tracy to a coordinate and : Does not turn her
If you wanted Tracy to complete her command immediately, which speed value would
you use? : 0
If you want three circles to be drawn next to each other (as seen in the image
below), after drawing the first circle, how far would you need to move Tracy before
drawing the next circle? : The circle's diameter