Python While Loop Quiz

Python While Loop Quiz

9th Grade

6 Qs

quiz-placeholder

Similar activities

Programming Basics

Programming Basics

9th - 10th Grade

10 Qs

Introduction to Computer Science

Introduction to Computer Science

1st - 9th Grade

10 Qs

Loops in Java

Loops in Java

9th - 12th Grade

10 Qs

Python Flow Control

Python Flow Control

9th - 12th Grade

10 Qs

While Loop

While Loop

9th Grade

10 Qs

Loops 101 DW Quiz

Loops 101 DW Quiz

9th - 12th Grade

10 Qs

RobotC Quiz

RobotC Quiz

9th Grade - University

10 Qs

Gmetrix JavaScript Session 3 Test

Gmetrix JavaScript Session 3 Test

9th - 12th Grade

10 Qs

Python While Loop Quiz

Python While Loop Quiz

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Vernon Leigh

Used 12+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does this `while` loop do?

a. Prints numbers from 0 to 4

b. Prints numbers from 1 to 5

c. Prints the value of `count` indefinitely

d. Raises an error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does this code snippet do?

a. Prints even numbers from 10 down to 2

b. Prints odd numbers from 1 to 9

c. Prints even numbers from 10 to -∞

d. Results in an infinite loop

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does this `while` loop print?

a. 0 1 2 3 4

b. 1 2 3 4 5

c. 0 1 2 3

d. Infinite loop

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which `while` loop correctly prints the first three multiples of 4?

Media Image
Media Image
Media Image
Media Image

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of this `while` loop?

a. 2 4 6

b. 2 4 6 8

c. 0 2 4 6

d. 2 4 8

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which `while` loop correctly prints the squares of numbers from 1 to 5?

Media Image
Media Image
Media Image
Media Image