Log in
Sign up for FREE
arrow_back
Library
Module 2 Quiz - Turtles and For Loops
By Jan Hampton
star
star
star
star
star
Share
share
Last updated almost 6 years ago
10 questions
Add this activity
Note from the author:
LCC College Now CS 161Python
1
1
1
1
1
1
1
1
1
1
Question 1
1.
1) In the following code, which line adds turtle functionality to the Python program?
import turtle
wn = turtle.Screen()
tess = turtle.Turtle()
tess = tess.shape("turtle")
Question 2
2.
In the following code, how many turtle shapes appear on the screen?
60
27
28
55
Question 3
3.
In the following code, what variable refers to the turtle?
tess
color
shape
wn
Question 4
4.
Which direction does the turtle face when it is first created?
North or Up
South or Down
East or Right
West or Left
Question 5
5.
The following code will go through the loop 3 times.
True
False
Question 6
6.
The command fred = turtle.Turtle() does which of the following?
Creates the screen for turtle action
Establishes a turtle named fred
Imports the turtle module into the Python program
Establishes turtle location
Question 7
7.
How many times will this code loop?
50
4
90
5
Question 8
8.
What shape will be drawn by the following code?
Square
Rectangle
Kite
Triangle
Question 9
9.
What will be drawn by the following code?
An error message
One square
Two squares, at a separation of 100 units, joined by a straight line
Two squares, at a separation of 100 units, without a line joining them
Question 10
10.
Which of the following programs will draw a shape like this:
import turtle
turing = turtle.Turtle()
for i in range(5):
turing.forward(110)
turing.right(144)
import turtle
turing = turtle.Turtle()
for i in range(4):
turing.forward(110)
turing.right(144)
import turtle
turing = turtle.Turtle()
for i in range(5):
turing.forward(110)
turing.right(72)
import turtle
turing = turtle.Turtle()
for i in range(4):
turing.forward(110)
turing.right(72)