Search Header Logo

turtle1

Authored by Dhilma Dhilma

Computers

9th - 12th Grade

Used 1+ times

turtle1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following Python code?

A square filled in with the colour green

A square outlined with the colour green

Blank canvas

Error

Answer explanation

The output shape of the code shown above is a square, outlined with the colour green, but not filled in with any colour. This is because we have not used the command t.end_fill() at the end.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In which direction is the turtle pointed by default?

North

South

East

West

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The command used to set only the x coordinate of the turtle at 45 units is:

reset(45)

setx(45)

xset(45)

xreset(45)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following functions returns a value in degrees, counterclockwise from the horizontal right?

heading()

degrees()

position()

window_height()

Answer explanation

The function heading() returns the heading of the turtle, which is a value in degrees counterclockwise from the horizontal right. This measure will be in radians if radians() has been called.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code?

import turtle

t=turtle.Pen()

t.right(90)

t.forward(100)

print(t.heading())

0.0

90.0

270.0

360.0

Answer explanation

The output of the code shown above will be 270.0. The function heading() returns the heading of the turtle, a value in degrees, counterclockwise from the horizontal right. The output shape of this code is a straight line pointing downwards.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following Python code?

True

False

Answer explanation

he function t.clear() returns a blank canvas, without changing the position of the turtle. Since the turtle is visible on the canvas, the output of this code is: True.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The following Python code will result in an error.

True

False

Answer explanation

Although a negative speed is not possible, the code shown above does not result in an error. Hence, the answer is False.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?