While Loops

Quiz
•
Mathematics, Computers
•
10th - 12th Grade
•
Hard
Austin Wilcox
Used 17+ times
FREE Resource
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 • 1 pt
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 • 1 pt
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 - - ;
}
Similar Resources on Wayground
10 questions
10 ԹԳՀԳ 2-րդ կիսամյակ ամփոփիչ գրավոր աշխատանք/ֆունկցիաներ/

Quiz
•
10th Grade
9 questions
Recursivitate

Quiz
•
11th Grade
12 questions
Массивы C++

Quiz
•
10th - 11th Grade
10 questions
XI - Kuis AP 1

Quiz
•
11th Grade
10 questions
Kuis Percabangan dan Perulangan

Quiz
•
10th Grade
10 questions
Array

Quiz
•
10th Grade
10 questions
Сpp 1_3

Quiz
•
9th - 12th Grade
12 questions
Bab 1.4.2 - Operator Hubungan dan Operator Logikal dlm Struktur

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Mathematics
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Solving Equations Opener

Quiz
•
11th Grade
6 questions
Maier - AMDM - Unit 1 - Quiz 1 - Estimation

Quiz
•
12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade
16 questions
Unit 2: Rigid Transformations

Quiz
•
10th Grade
20 questions
The Real Number System

Quiz
•
8th - 10th Grade
15 questions
Polynomials: Naming, Simplifying, and Evaluating

Quiz
•
9th - 11th Grade
40 questions
Camp CMS Math 1 Test Review

Quiz
•
9th - 12th Grade