0% found this document useful (0 votes)
44 views4 pages

Every Single Python Answer

The document contains Python scripts and quizzes about using the Turtle module to draw shapes and move a turtle named Tracy. The scripts include commands to draw shapes like circles, lines, rectangles and more using for loops. The quizzes ask questions about Turtle commands like forward, circle, and turning Tracy using angles to confirm understanding of how to program Tracy's movements and drawing.

Uploaded by

Shrestha Mishra
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
0% found this document useful (0 votes)
44 views4 pages

Every Single Python Answer

The document contains Python scripts and quizzes about using the Turtle module to draw shapes and move a turtle named Tracy. The scripts include commands to draw shapes like circles, lines, rectangles and more using for loops. The quizzes ask questions about Turtle commands like forward, circle, and turning Tracy using angles to confirm understanding of how to program Tracy's movements and drawing.

Uploaded by

Shrestha Mishra
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 4

SCRIPTS:

1.1.4 - Stretched Slinky:

for x in range(5):
circle(35)
forward(40)

1.2.4 - Shorter Dashed Line:

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)

2.2.5 - Row of Circles:


penup()
backward(200)
forward(10)
pendown()
for x in range(20):
circle(10)
penup()
forward(20)
pendown()

2.2.6 - Columns 2.0:

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:

for x in range(0, 6):


forward(50)
left(60)

2.3.6 - 'X' Marks the Spot:

left(45)
for x in range(0, 4):
forward(100)
backward(100)
left(90)

2.3.7 - Circle Pyramid:

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:

1.1.2 - Intro to Tracy:

How would I tell Tracy to move forward 100 pixels? : forward(100)


When using the circle() command, what value do we put inside the parentheses? : The
radius of the circle
When Tracy is facing right, from what location does she start drawing her circle? :
The bottom of the circle

1.2.2 - Tracy's Grid World:

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)

2.1.2 - Turning Tracy:

Tracy always starts facing which direction? : East


If Tracy is facing right, which of the following commands can be used to turn her
to face up? : A & C
If Tracy started facing right, which direction would she be facing after we ran the
following code? : Up

2.2.2 - For Loops:

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

2.3.2 - Turning Tracy Using Angles:

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

You might also like