Looping/Iterations in Java
Questions on reading, analyzing, and evaluating looping algorithms based on the Java programing language.
Created Date
08.01.21
Last Updated
08.10.21
Viewed 5 Times
Create multiple-choice games on Wisc-Online and play them on our Chakalaka mobile app!
But that's not all! Explore educational games created by others. Simply search by category or enter agame code number and dive into a world of learning and fun.
Download the Chakalaka mobile app here:
Topics of this game:
-
Which looping algorithm includes the counter update in the loop header?
-
Which part of a for loop keeps track of the number of loop iterations?
-
In what order does a while loop execute code?
-
What is the main reason programmers use looping algorithms in their programs?
-
How many times will the following loop execute?
int j = 1;
while (j < 10)
{
j++;
System.out.println(j);
}
-
How many times will the following loop execute?
for(int 1=0;i < 10 0; i+=2)
{
System.out.println(i);
}
-
What is the output of the code snippet given below?
for (int i = 1; i != 7; i+=2)
{
System.out.print("" + i);
}
-
What will be the effect of changing the boolean expression in the following code from i !=7 to i >= 7?
for (int i = 1; i != 7; i+=2)
{
System.out.print("" + i);
}
-
Evaluate the code and select the statement that correctly completes the loop.
int base = 10;
double price = 10000;
while (base > 0)
{
__________
...
}
-
Which of the following statements explains why the code is considered bad?
for (price = 2; balance++ < 10; System.out.print(total))
. . .
I. Loop iteration is confusing
II. Code doesn’t follow for loop format
III. Unrelated statements in header
User comments are currently unavailable. We apologize for the inconvenience and are working to restore this feature as soon as possible.