Python Loops

Python Loops

University

17 Qs

quiz-placeholder

Similar activities

Mastering Python Loops and Functions

Mastering Python Loops and Functions

10th Grade - University

20 Qs

ASK F2 -KOD ARAHAN (PYTHON)

ASK F2 -KOD ARAHAN (PYTHON)

1st Grade - University

15 Qs

AITT LAB QUIZ 1

AITT LAB QUIZ 1

University

15 Qs

Unit 3 Looping - Quiz

Unit 3 Looping - Quiz

9th Grade - University

20 Qs

Round 4 - Harvest

Round 4 - Harvest

University

15 Qs

Python 1.0

Python 1.0

10th Grade - University

20 Qs

Geeks for Geeks PCCOER Info Session CP Quiz

Geeks for Geeks PCCOER Info Session CP Quiz

University

20 Qs

Examen Introductorio de Estructura de datos en Python

Examen Introductorio de Estructura de datos en Python

University

16 Qs

Python Loops

Python Loops

Assessment

Quiz

Computers

University

Hard

Created by

Elaine Cortez

Used 286+ 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?