For and While Loops in Python

For and While Loops in Python

9th - 12th Grade

16 Qs

quiz-placeholder

Similar activities

TIN 11 BÀI 11 KIỂU MẢNG

TIN 11 BÀI 11 KIỂU MẢNG

11th Grade

18 Qs

Начала программирования на языке Паскаль

Начала программирования на языке Паскаль

8th - 11th Grade

15 Qs

RAM&HDD/SSD

RAM&HDD/SSD

10th - 12th Grade

13 Qs

Online Platform Block Q

Online Platform Block Q

11th - 12th Grade

20 Qs

City & Guilds Award in Business Processes

City & Guilds Award in Business Processes

12th Grade

20 Qs

Nhập môn HTML

Nhập môn HTML

6th - 9th Grade

13 Qs

Databases

Databases

11th Grade

15 Qs

Latihan 2

Latihan 2

9th Grade

20 Qs

For and While Loops in Python

For and While Loops in Python

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Lauren Tan

Used 159+ times

FREE Resource

AI

Enhance your content in a minute

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

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

The program above

prints all the odd numbers between 1 and 20

prints all even numbers between 1 and 20

print all the odd numbers between 1 and 21

prints all the even numbers between 1 and 21

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

The equivalent of the above for loop using the while syntax would be

Media Image
Media Image
Media Image
Media Image

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

The above program prints

Numbers 1 to 10 in reverse order

Numbers 1 to 11 in reverse order

Numbers 1 to 10

Numbers 1 to 11

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Look at the following code, what will it generate

1,2,3,4,5,6,7,8,9,10,11,12

0,1,2,3,4,5,6,7,8,9,10,11,12

1,2,3,4,5,6,7,8,9,10,11,12,13

0,1,2,3,4,5,6,7,8,9,10,11,12,13

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Media Image
Media Image
Media Image

1,2,3,4

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What best describes what is printed by the following code?

Prints the numbers 0 through 6

Prints

h

e

l

l

o

w

Prints the phrase "hello world!" 7 times

Prints "hello w" 7 times

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What best describes what is printed by the following code?

Prints the numbers 0 through 6

Prints

h

e

l

l

o

w

Prints the phrase "hello world!" 7 times

Prints "hello w" 7 times

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?