Python while loop

Quiz
•
Computers
•
8th Grade
•
Medium
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
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
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
What is the final value of the variable 'number'?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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
Similar Resources on Wayground
13 questions
FOR Loop Python

Quiz
•
6th - 8th Grade
10 questions
PYTHON (FOR LOOP)

Quiz
•
1st - 10th Grade
10 questions
Quiz 13 - For Loops

Quiz
•
11th Grade
12 questions
Loops (Python)

Quiz
•
8th Grade
9 questions
CMU CS Academy Unit 7.3.1 For Loops

Quiz
•
9th Grade
10 questions
TIU Quiz-4

Quiz
•
University
14 questions
1.1.5 CSE Iteration and Loops

Quiz
•
9th - 12th Grade
10 questions
Unit 2 Python

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade