0

I want the terminal to return to the loop until the answer is 'OK'

Tried adding return to make the statement return into the lopp until the answer is desired

while true:
   agreement = str(input("Answer only in Yes or No OK? \n write 'OK' if you agree \n"))
   if agreement == str("OK"):
      print("Thanks")
   else:
      print("You can't move ahead without writing 'OK'")
       return agreement

itworking = str(input("Are you living?\n"))

if itworking == str ("yes"):
   print("You are living dude!")
else:
   print("You are dead hehe")

tadman
  • 208,517
  • 23
  • 234
  • 262

0 Answers0