FBISE, NCP & NBF-aligned resources for Classes 9–12
Browse by Class
Browse by Type
Computer Chapter 3 : Topic 3.1
Python Turtle Library and Methods
1 / 20
In VS Code, which Turtle function moves the pointer $\mathbf{100}$ pixels forward in its current direction?
Reasoning: $\mathbf{forward(distance)}$ moves the turtle forward by the specified number of pixels.
2 / 20
A student uses Replit to rotate a Turtle $\mathbf{90}$ degrees clockwise. Which function performs this operation?
Reasoning: $\mathbf{right(angle)}$ turns the turtle clockwise by the given angle.
3 / 20
Which Turtle function should a programmer use to move backward 50 pixels without changing direction?
Reasoning: $\mathbf{back()}$ or $\mathbf{backward()}$ moves the turtle backward while keeping its current heading.
4 / 20
In the following code, which function prevents Turtle from drawing while moving to another position? $\mathbf{t.penup()}$ $\mathbf{t.goto(100,\ 80)}$
Reasoning: $\mathbf{penup()}$ raises the drawing pen, so movement occurs without producing a line.
5 / 20
After moving without drawing, which Turtle function allows the student to start drawing lines again?
Reasoning: $\mathbf{pendown()}$ lowers the pen so subsequent turtle movements produce visible lines.
6 / 20
Which function moves a Turtle directly to coordinates $\mathbf{(120,\ 60)}$ while working in Python Replit?
Reasoning: $\mathbf{goto(x,\ y)}$ moves the turtle directly to the specified screen coordinates.
7 / 20
Which Turtle function is correctly used to draw a circle having a radius of $\mathbf{50}$ pixels?
Reasoning: $\mathbf{circle(radius)}$ makes the turtle draw a circle using the specified radius.
8 / 20
A square requires four equal movements and $\mathbf{90}$-degree turns. Which functions correctly construct this shape?
Reasoning: Repeating $\mathbf{forward()}$ and $\mathbf{right(90)}$ four times produces the four sides of a square.
9 / 20
Which Turtle function returns the pointer to $\mathbf{(0,0)}$ and restores its original starting direction automatically?
Reasoning: $\mathbf{home()}$ moves the turtle to the origin and restores its default heading.
10 / 20
In VS Code, which Turtle method sets the pointer’s absolute direction to exactly $\mathbf{180}$ degrees?
Reasoning: $\mathbf{setheading(angle)}$ directly sets the turtle’s absolute orientation to the specified angle.
11 / 20
Which Screen method changes the background colour of the Turtle graphics window to light blue?
Reasoning: $\mathbf{bgcolor()}$ is a Screen method used to set the graphics window’s background colour.
12 / 20
Which Screen method assigns the text “$\mathbf{Turtle\ Drawing}$” as the Turtle graphics window title?
Reasoning: $\mathbf{title()}$ changes the title displayed on the Turtle graphics window.
13 / 20
Which Screen function is used to define the Turtle graphics window width and height initially?
Reasoning: $\mathbf{setup(width,\ height)}$ specifies the initial dimensions and position of the Turtle window.
14 / 20
A programmer wants keyboard events to work after calling $\mathbf{onke}\mathbf{y()}$. Which Screen function must be called?
Reasoning: $\mathbf{listen()}$ gives keyboard focus to the Turtle screen so registered key events can be detected.
15 / 20
Which Screen function connects pressing the Up Arrow key with a previously defined $\mathbf{move()}$ function?
Reasoning: $\mathbf{onkey(function,\ key)}$ associates a keyboard key with a function that runs when pressed.
16 / 20
Which Turtle event method executes $\mathbf{change\_ color()}$ when the user clicks directly on the turtle pointer?
Reasoning: A Turtle object’s $\mathbf{onclick()}$ method runs a specified function when that turtle is clicked.
17 / 20
Which pair of Turtle functions correctly starts and finishes filling a closed geometric shape with colour?
Reasoning: Drawing between $\mathbf{begin\_ fill()}$ and $\mathbf{end\_ fill()}$ causes the enclosed area to be filled.
18 / 20
Which function specifies the interior colour before $\mathbf{begin\_ fill()}$ and $\mathbf{end\_ fill()}$ create a coloured shape?
Reasoning: $\mathbf{fillcolor()}\mathbf{\ }$specifies the colour used to fill a closed shape.
19 / 20
Which Turtle function registers a newly created custom or compound shape so a turtle can use it?
Reasoning: $\mathbf{register\_ shape()}$ adds a custom or compound shape to Turtle’s available shape collection.
20 / 20
A compound Turtle shape contains multiple polygons. Which method adds each polygon component to that compound shape?
Reasoning: $\mathbf{addcompo}\mathbf{nent()}$ adds individual polygon components, including fill and outline colours, to a compound Turtle shape.
Your score is
Restart quiz