Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the primary purpose of a WHILE loop?
Refer to the definition of WHILE loop.
Identify a situation where a WHILE loop would be appropriate.
Think about interactions.
What does the WHILE loop do?
Consider the purpose of the WHILE loop.
True or False: A WHILE loop must have a condition that eventually becomes false.
Think of how the loop would end.
Write a program using a WHILE loop that prompts the user for input until they type 'stop'. After receiving the stop command, print all inputs given.
Use a list to collect inputs.
Create a WHILE loop that asks for user input until the input is a number. If it’s not a number, prompt again.
Use string methods to verify if the input is numeric.
5 more questions in this section. Enroll free to practise them all.
Enroll free