Quiz 3

Quiz 3

University

12 Qs

quiz-placeholder

Similar activities

Quizziz 2

Quizziz 2

University

10 Qs

Data Literacy Quizizz

Data Literacy Quizizz

6th Grade - University

15 Qs

PPL 223 - (QUIZ 3) Data Types and Structures

PPL 223 - (QUIZ 3) Data Types and Structures

University

15 Qs

Quiz Pemrograman dan Algoritma

Quiz Pemrograman dan Algoritma

1st Grade - University

10 Qs

Borders and Shades in Word 2010 Quiz

Borders and Shades in Word 2010 Quiz

10th Grade - University

12 Qs

Workshop_quiz_on Sk-learn

Workshop_quiz_on Sk-learn

University

15 Qs

Forum Activity Tech quiz

Forum Activity Tech quiz

University

15 Qs

LA 1A 2024 - QUIZ P15

LA 1A 2024 - QUIZ P15

University

17 Qs

Quiz 3

Quiz 3

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Wai Li

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What is the output of the following code?

for i in range(3):

print(i)

1 2 3
0 1 2
0 1 2 3
Error

2.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What does the break statement do in a loop?

Pauses the loop
Repeats the loop
Exits the loop immediately
Skips one iteration

3.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

How many times will this loop run?

i = 0

while i < 3:

print(i)

i += 1

2
3
4
Infinite

4.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Which of the following will create an infinite loop?

for i in range(5):
while True:
while i < 10: with i +=1
for i in range(0, -1):

5.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Media Image

(0, 0), (1, 1)
(0, 0), (0, 1), (1, 0), (1, 1)
(2, 2)
Error

6.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What is the correct way to loop 5 times using a while loop?

while 5:
for i in 5:
i = 0; while i < 5: i += 1
while i ==5:

7.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Which loop will execute the body at least once, even if the condition is false initially?

for loop
while loop
Neither - Python has no do-while
Both

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?