Question: IN PYTHON3... why am I still getting an infinite loop here if I type something other than yes or no? ans1 = input(Do you want
IN PYTHON3... why am I still getting an infinite loop here if I type something other than yes or no?
ans1 = input("Do you want to replace phrases?: ") ans1 = ans1.upper() v = 1 while v == 1: if ans1 == "yes".upper():
acro_string = acronym(main_string) v = 2 elif ans1 == "no".upper(): acro_string = main_string v = 2 else: print("Please answer yes or no. Do you want to replace phrases?: ") v = 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
