Jul-03-2021, 08:08 AM
Hint: there are two ways to exit a while loop. The classic way according to the rules of Stuctured Programming is to use a condition:
answer = "y" while answer == "y" : # do your thing answer = input("Start again? y/n ")Or else you can break from the loop.
while True: # do your thing answer = input("Start again? y/n ") if answer == "n": breakLet us know how you solved it.