Python while loops

Python while loops

12th Grade

20 Qs

quiz-placeholder

Similar activities

UH - 01 VII

UH - 01 VII

1st - 12th Grade

20 Qs

Microsoft Excel

Microsoft Excel

KG - Professional Development

20 Qs

Latihan Usek Informatika

Latihan Usek Informatika

12th Grade

15 Qs

Siskomdig Harian

Siskomdig Harian

12th Grade

20 Qs

SHEET QUIZ

SHEET QUIZ

9th - 12th Grade

15 Qs

CIW

CIW

9th - 12th Grade

15 Qs

C-Programming Basics

C-Programming Basics

12th Grade

16 Qs

Python while loops

Python while loops

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Sean Rattigan

Used 308+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

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)

2.

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

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

What is the final value of n?

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.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of this code?

It would print 'So good to see you' infinite number of times

There would be no output

It would print an error message.

It would print 'Enter correct code'.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The condition for a while loop to continue could include which of the following?

While something equals something

While something is True

While something is greater than something

All of these

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

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

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?