Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What type of loop would you use if you know how many times you want to loop?
Think about the number of iterations.
What does a WHILE loop depend on to keep running?
Consider what controls the flow of the loop.
Which loop is best used when the number of iterations is known?
Consider which loop structure has defined iteration.
A WHILE loop continues until a certain condition becomes false.
Reflect on what controls the WHILE loop.
Create a program that uses a WHILE loop to keep requesting a password until the correct one is entered.
Ensure you have a break condition in your loop.
Write a FOR loop that generates the first 20 Fibonacci numbers.
Remember your Fibonacci sequence generation!
5 more questions in this section. Enroll free to practise them all.
Enroll free