Search Header Logo

Python Loops Quiz

Authored by Jakobi Gorham

Computers

9th - 12th Grade

Used 3+ times

Python Loops Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does this code print?

A

B

C

A

C

A

A

B

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does this code print?

A

B

C

A

A

C

B

C

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the code print?

B

C

A

C

B

A

C

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the code print?

10

7

4

1

Done

10

9

8

7

6

5

4

3

2

1

Done

Done

10

7

4

1

-2

-5

... and more, running infinitely.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In programming, what is iteration/looping?

The repetition of steps within a program

The order in which instructions are carried out

A decision point in a program

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is iteration important?

It determines the order in which instructions are carried out
It allows code to be simplified by removing duplicated steps
It allows multiple paths through a program

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

numbers = [5, 14, 9, 17]

for number in numbers:

if number % 3 == 0:

print(number)


The output will be?

17

9

14

9

17

14

17

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?