Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is a loop in programming?
Think about what repetitive tasks in programming might require.
Describe a for loop syntax.
Remember the three parts that make up the for loop.
What does a for loop do?
Think of scenarios where you set a starting point, an end point, and increments.
True or False: A do-while loop can execute zero times.
Consider how conditions are checked in both types of loops.
Create a Java program that prints a triangle pattern using nested loops, with a specified number of rows input by the user.
Think about how many stars you need in each row based on the current row number.
Write a Java program using loops to calculate the factorial of a number given by the user.
Factorial means multiplying the number by all integers below it, so set up a loop that iterates through all those numbers!
4 more questions in this section. Enroll free to practise them all.
Enroll free