Python while loop

Python while loop

8th Grade

13 Qs

quiz-placeholder

Similar activities

Looping in Python

Looping in Python

10th - 11th Grade

18 Qs

Computer science paper 2

Computer science paper 2

10th Grade

15 Qs

Code.org Unit 5 - Loops

Code.org Unit 5 - Loops

9th - 12th Grade

10 Qs

Edhesive Python Unit 4: Test Review

Edhesive Python Unit 4: Test Review

10th - 11th Grade

10 Qs

Python_Loop(for) _high level

Python_Loop(for) _high level

9th Grade

15 Qs

Java Quiz 2 based on loop and if else

Java Quiz 2 based on loop and if else

University

10 Qs

Quiz 10 - While Loops

Quiz 10 - While Loops

11th Grade

10 Qs

Quiz#6

Quiz#6

8th Grade

10 Qs

Python while loop

Python while loop

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Raja Meenakshi

Used 4+ times

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A while loop is used when

You know how many times you are going to loop

You want to loop for an unknown number of times, and possibly forever

You only want to run the code in the loop once

You see the word while in the problem description

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

For the code shown, what will happen?

It will print all the numbers from 0 to 11

It will print all the numbers from 0 to 11 in increments of 3

Infinite loop

It will not run (Syntax error)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

For the code shown, what will happen?

It will print all the numbers from 0 to 11

It will print all the numbers from 0 to 11 in increments of 3

Infinite loop

It will not run (Syntax error)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is iteration important?

It determines the order in which instructions are carried out

It allows code to be simplified by removing duplicated steps into a block that can be executed many times

It allows multiple paths through a program

It ensures the code works correctly

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

What is the final value of the variable 'number'?

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output?

5

4

3

2

1

5 4 3 2 1

4

3

2

1

0

4 3 2 1 0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output?

12 9 6 3 0

0 3 6 9 12

0 3 6 9

9 6 3 0

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?