Python - For Loop & Nested Loops

Python - For Loop & Nested Loops

7th Grade

12 Qs

quiz-placeholder

Similar activities

Python Review

Python Review

7th - 8th Grade

17 Qs

Python Quiz - 3

Python Quiz - 3

3rd - 9th Grade

10 Qs

Coding Quiz 1

Coding Quiz 1

6th - 8th Grade

10 Qs

Python - Year 8

Python - Year 8

3rd Grade - University

10 Qs

Ցիկլի օպերատորները Python լեզվում

Ցիկլի օպերատորները Python լեզվում

7th Grade

10 Qs

Алгоритмические конструкции

Алгоритмические конструкции

7th Grade

10 Qs

Python Input and Variable Assignment

Python Input and Variable Assignment

6th - 8th Grade

15 Qs

Python Quiz 1

Python Quiz 1

6th Grade - University

12 Qs

Python - For Loop & Nested Loops

Python - For Loop & Nested Loops

Assessment

Quiz

Computers

7th Grade

Medium

Created by

Nur Hashimi

Used 3+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to start a for loop in Python?

loop

for

repeat

while

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will for i in range(3): print(i) output?

1 2 3

0 1 2

0 1 2 3

1 2

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In for x in range(5):, how many times will the loop run?

4

5

6

Infinite

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function generates a sequence of numbers for a loop?

list()

numbers()

range()

seq()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a nested loop?

A loop that runs only once

A loop inside another loop

A loop without a range

A loop with a break

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a nested loop, which loop runs faster?

The outer loop

The inner loop

Both run at same speed

None

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is TRUE about for loops?

They can only loop over numbers

They can loop over strings, lists, or ranges

They run forever

They must have 3 parameters

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?