python turtle programming Flashcards
(26 cards)
What is the main purpose of the Python Turtle module?
To create graphics and drawings using a virtual turtle.
True or False: The turtle starts facing north by default.
True
What command is used to move the turtle forward?
turtle.forward()
Fill in the blank: To turn the turtle right, you use the command turtle._____.
right()
What command would you use to change the turtle’s color?
turtle.color()
Which command is used to clear the screen?
turtle.clear()
What does the command turtle.penup() do?
It lifts the pen so that the turtle does not draw while moving.
What is the default shape of the turtle?
A triangle.
True or False: You can use turtle.circle() to draw a circle.
True
What does the command turtle.goto(x, y) do?
Moves the turtle to the coordinates (x, y).
What is the command to set the background color?
turtle.bgcolor()
Multiple Choice: Which command changes the turtle’s speed? A) turtle.speed() B) turtle.move() C) turtle.run()
A) turtle.speed()
Fill in the blank: To draw a square, you can use a loop with the command turtle._____().
forward()
What command would you use to make the turtle draw a line?
turtle.pendown()
True or False: The turtle can only draw in one color at a time.
False
What does the command turtle.setheading(angle) do?
Sets the direction the turtle is facing to the specified angle.
What is the purpose of the turtle.done() command?
To finish the turtle graphics and display the window.
Multiple Choice: Which function is used to fill shapes? A) turtle.fill() B) turtle.begin_fill() C) turtle.shape_fill()
B) turtle.begin_fill()
What command would you use to draw a rectangle?
You can use a combination of turtle.forward() and turtle.right() in a loop.
Fill in the blank: To repeat a command multiple times, you can use a _____ loop.
for
What does the command turtle.speed(0) do?
Sets the turtle to the fastest drawing speed.
True or False: The turtle can be moved without drawing by using turtle.penup().
True
What command is used to change the turtle’s shape?
turtle.shape()
What does the command turtle.fillcolor() do?
Sets the color used for filling shapes.