Question:
You want to print a message that tells the user to “try again” as long as the value of the attempt variable is 5 or less, and you want to increase the value of this variable by 1 each time it passes through the loop.
Iterative statement
attempt = 1
while attempt < 5:
print("Try again.")
attempt = attempt + 1
attempt = 1
while attempt != 5:
print("Try again.")
attempt = 1
while attempt <= 5:
print("Try again.")
attempt = 1
while attempt <= 5:
print("Try again.")
attempt = attempt + 1