Python Loops

Python Loops

University

17 Qs

quiz-placeholder

Similar activities

PROGRAMMING IN PYTHON - UNIT II - TEST 1 MCQS

PROGRAMMING IN PYTHON - UNIT II - TEST 1 MCQS

University

15 Qs

Week 7 Quiz

Week 7 Quiz

University

15 Qs

AITT LAB QUIZ 1

AITT LAB QUIZ 1

University

15 Qs

Round 4 - Harvest

Round 4 - Harvest

University

15 Qs

AI BootCamp: 2024 Edition- Session 1

AI BootCamp: 2024 Edition- Session 1

University

20 Qs

Intermediate Python

Intermediate Python

University

15 Qs

Unit 3 Looping - Quiz

Unit 3 Looping - Quiz

9th Grade - University

20 Qs

Python Basics

Python Basics

KG - University

16 Qs

Python Loops

Python Loops

Assessment

Quiz

Computers

University

Hard

Created by

Elaine Cortez

Used 261+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 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

2.

MULTIPLE CHOICE QUESTION

1 min • 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

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is iteration known as?
Looping
Crashing
Repeating

4.

MULTIPLE CHOICE QUESTION

1 min • 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

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

numbers = [5, 14 ,9, 17]

for number in numbers:

if number >= 9:

print (number)


The output will be?

17

9

14

9

17

14

17

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image
Which of the following will print:
for i in range(1, 5):   
print(str(i) * 5)
for i in range(1, 5):   
print("i" * i)
for i in range(1, 6):   
print("i" * i)
for i in range(1, 6):   
print(str(i) * i)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be printed after running this FOR loop:

for number in range(6):
 
    print(number)
The number 6 
The numbers 0 - 5
The number 5
The numbers 1 - 6

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?