Mastering Python Loops

Mastering Python Loops

11th Grade

25 Qs

quiz-placeholder

Similar activities

Programming

Programming

9th - 11th Grade

20 Qs

CodeHS 3.1 Boolean Expressions-4.2 For Loops Review

CodeHS 3.1 Boolean Expressions-4.2 For Loops Review

9th - 12th Grade

21 Qs

Python 14/12/16

Python 14/12/16

9th - 11th Grade

20 Qs

Lists, Loops and Traversals

Lists, Loops and Traversals

10th - 12th Grade

20 Qs

Loops, Lists, and Traversals

Loops, Lists, and Traversals

10th - 12th Grade

20 Qs

Java For Loop basic syntax

Java For Loop basic syntax

9th - 12th Grade

20 Qs

Python Strings

Python Strings

11th Grade

21 Qs

Algorithms - python (GCSE)

Algorithms - python (GCSE)

10th - 12th Grade

25 Qs

Mastering Python Loops

Mastering Python Loops

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Harmeet Kaur

Used 2+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the output?

6

3

2

0

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What does this print?

1, 4, 7,

1, 2, 3,

3, 6, 9,

1, 3, 5, 7, 9,

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following results in an infinite loop?

for i in range(10):

for i in [1, 2, 3]:

for i in iter(int, 1):

for i in range(5, 1):

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What does this code output?

1-3-5-

1-3-

0-2-4-

0-1-2-3-4-

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the output?

3 4 5 6 7

3 4 5 6

3 4 5

3 4 5 6 7 8

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What does this code print?

l o o p

ll oo oo pp

looploop

loopp

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which is equivalent to for i in range(len(arr)):?

for i in arr:

for i in range(arr):

for i in enumerate(arr):

for i in arr.items():

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?