Quiz 3

Quiz 3

University

12 Qs

quiz-placeholder

Similar activities

ViewSonic LCD Training

ViewSonic LCD Training

12th Grade - University

15 Qs

Titanic Challenge

Titanic Challenge

University

16 Qs

15-JS Методы массивов (продолжение)

15-JS Методы массивов (продолжение)

University

10 Qs

QUIZ KEJAHATAN DUNIA MAYA

QUIZ KEJAHATAN DUNIA MAYA

University

12 Qs

Data Visualization with Qlik Cloud

Data Visualization with Qlik Cloud

University

10 Qs

Los 10 escalones

Los 10 escalones

University

10 Qs

Mobile Programming - POCC

Mobile Programming - POCC

University

15 Qs

HCI GOMS quiz

HCI GOMS quiz

University

15 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?