Complete the code to run the loop while count is less than 5.
count = 0 while count [1] 5: print(count) count += 1
The loop should continue while count is less than 5, so the condition is count < 5.
Complete the code to stop the loop when num reaches 10.
num = 0 while num [1] 10: print(num) num += 2
The loop should run while num is less than 10, so the condition is num < 10.
Fix the error in the loop condition to avoid an infinite loop.
i = 5 while i [1] 0: print(i) i -= 1
The loop should run while i is greater than 0, so the condition is i > 0. Using '<' would cause the loop to never run.
Fill both blanks to create a loop that prints numbers from 1 to 5.
num = 1 while num [1] 5: print(num) num [2] 1
num, causing an infinite loop.The loop should run while num is less than or equal to 5, and num should increase by 1 each time.
Fill all three blanks to create a loop that prints even numbers from 2 to 10.
start = [1] end = [2] while start [3] end: print(start) start += 2
The loop starts at 2, ends at 10, and runs while start is less than or equal to end.