For and While Loops in Python

For and While Loops in Python

9th - 12th Grade

16 Qs

quiz-placeholder

Similar activities

ASESMEN INFORMATIKAN BAB 1 SERI 2

ASESMEN INFORMATIKAN BAB 1 SERI 2

10th Grade

15 Qs

CSS GRADE 9 - QUIZ PECs and EM

CSS GRADE 9 - QUIZ PECs and EM

9th Grade

20 Qs

Y9 Creative iMedia RO81 Quiz Part 1

Y9 Creative iMedia RO81 Quiz Part 1

9th Grade

21 Qs

CSS 10 - QUIZ

CSS 10 - QUIZ

10th Grade

20 Qs

Accessing the Internet

Accessing the Internet

9th - 10th Grade

15 Qs

Quiz Pemrograman Perangkat Bergerak 2

Quiz Pemrograman Perangkat Bergerak 2

12th Grade - University

20 Qs

CHỦ ĐỀ A. MÁY TÍNH VÀ XÃ HỘI TRÍ THỨC P1

CHỦ ĐỀ A. MÁY TÍNH VÀ XÃ HỘI TRÍ THỨC P1

10th 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 195+ 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

Already have an account?