Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
Loading...
Loading...
Loading...
Give this quiz to my class
Q 1/4
Score 0
How many times will this loop run?
int counter = 0;
while (counter < 10) {
//some code here
counter = counter + 1;
}
30
0 times
11 times
infinite times (it won't stop)
10 times
Q 2/4
Score 0
How many times will this loop run?
int counter = 10;
while (counter > 4) {
//some code here
counter = counter - 1;
}
30
infinite times (it won't stop)
5 times
4 times
6 times
4 questions
Q.
How many times will this loop run?
int counter = 0;
while (counter < 10) {
//some code here
counter = counter + 1;
}
1
30 sec
Q.
How many times will this loop run?
int counter = 10;
while (counter > 4) {
//some code here
counter = counter - 1;
}
2
30 sec
Q.
How many times will this loop run?
Random random = new Random();
int secret = 5;
int guess = random.nextInt(10)+1;
while (guess != secret) {
guess = random.nextInt(10)+1;
}
3
30 sec
Q.
How many times will this loop run?
int age = 40;
while (age > 30) {
age = age + 1;
}