
While Loops
Authored by Austin Wilcox
Mathematics, Computers
10th - 12th Grade
Used 17+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Make this code loop three times:
in tries= 0;
while(_________ ) {
cin>> “Looping!”;
tries++;
}
tries < 3
answer == 3
tries > 0
tries < 0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Make this code stop looping when you get the right answer or have no more tries left
string answer;
int tries = 5;
while(_________) {
cin>> answer;
if (answer == “the right answer”){
cout<<“correct”<<endl;
break;
}
tries - - ;
}
tries == answer
tries > 0
tries >= 3
tries <= 5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed out here:
int x=8;
while (x<4){
cout << "WOAH!";
}
NOTHING
INFINITE LOOP
WOAH!WOAH!WOAH!WOAH!
WOAH!WOAH!WOAH!WOAH!WOAH!
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times does the following code run:
int x=9;
while (x<11){
int y=2;
while (y>=-3){
cout << x*y;
y--;
x++;
}
}
0
infinite number
10
12
5.
OPEN ENDED QUESTION
1 min • Ungraded
What is the output here:
int x=9;
while (x<11){
int y=2;
while (y>=-3){
cout << x*y;
y--;
x++;
}
}
Evaluate responses using AI:
OFF
6.
OPEN ENDED QUESTION
3 mins • Ungraded
What is the initializer, condition, and finalizer in the following code:
int x=7;
while (x<12){
cout << 2*x;
x+=2;
}
Evaluate responses using AI:
OFF
7.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
Fill in the blank with the right symbol to make this code print Tacos 4 times
int tacos = 4;
while(tacos ___ 0){
cout<<“Tacos”<<endl;
tacos - - ;
}
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Logaritmo
Quiz
•
10th Grade - University
10 questions
C# lesson10
Quiz
•
1st - 10th Grade
10 questions
Ulangan Harian Persamaan Garis Singgung Lingkaran
Quiz
•
11th Grade
12 questions
Integrale
Quiz
•
12th Grade
11 questions
Інтеграли
Quiz
•
12th Grade
12 questions
Razonamiento Cuantitativo
Quiz
•
1st - 12th Grade
10 questions
HTML & Google Site Seatwork
Quiz
•
12th Grade
10 questions
қайталау тест 1 сынып
Quiz
•
10th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Mathematics
8 questions
2 Step Word Problems
Quiz
•
KG - University
10 questions
Finding Area and Circumference of a Circle
Interactive video
•
6th - 10th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
15 questions
TSI Math Practice Questions
Quiz
•
8th - 12th Grade
24 questions
Identify Properties of Polygons and Quadrilaterals
Quiz
•
9th - 12th Grade
10 questions
Simplifying Expressions with the Distributive Property
Interactive video
•
6th - 10th Grade
25 questions
Simplify Expressions with Exponents
Quiz
•
9th - 12th Grade
20 questions
Basic Trig Ratios
Quiz
•
9th - 12th Grade