Python Quiz 1

Python Quiz 1

9th - 12th Grade

14 Qs

quiz-placeholder

Similar activities

Python Re-Cap

Python Re-Cap

7th - 9th Grade

16 Qs

[AP CSP] Programming: Conditionals

[AP CSP] Programming: Conditionals

9th - 12th Grade

10 Qs

Computer Science

Computer Science

9th - 12th Grade

18 Qs

Exploring Python Turtle Graphics

Exploring Python Turtle Graphics

7th Grade - University

12 Qs

CM Adventure Part 1 - Intro, Stepping, TurnTo & Time Loops

CM Adventure Part 1 - Intro, Stepping, TurnTo & Time Loops

9th - 10th Grade

10 Qs

Python Basics Review

Python Basics Review

10th Grade

18 Qs

C++ - Loops and Random Numbers

C++ - Loops and Random Numbers

9th - 12th Grade

14 Qs

Python - Loops & Lists

Python - Loops & Lists

7th - 11th Grade

15 Qs

Python Quiz 1

Python Quiz 1

Assessment

Quiz

Computers

9th - 12th Grade

Easy

Created by

Jessica Fletcher

Used 7+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which direction does the Turtle face when it is created?

North

South

East

West

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following code. What does the line “import turtle” do?

It creates a new turtle object that can be used for drawing.

It defines the module turtle which will allow you to create a Turtle object and draw with it.

It makes the turtle draw half of a rectangle on the screen.

Nothing, it is unnecessary.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False: A Turtle object can have any name that follows the naming rules

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following code would produce the following image?

Media Image
Media Image
Media Image
Media Image

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False: You can only have one active turtle at a time. If you create a second one, you will no longer be able to access or use the first.

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does python know what statements are contained in a for loop or while loop body?

They are indented to the same degree from the loop header.

There is always exactly one line in the loop body.

The loop body ends with a semi-colon (;) which is not shown in the code above.Check MeCompare me

The loop body is handled with curly braces { }.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The correct code to generate a random number between 1 and 100 (inclusive) is:

prob = random.randint(1, 101)

prob = random.randint(1, 100)

prob = random.randint(0, 101)

prob = random.randint(0, 101)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?