Continuos loop with user input condition in python?
问题 I just learn my first python and try to make a continuous loop that has a user input condition. #Make the calculating func def data_cal(): pennies = int(input("What's your pennies?")) dollars = pennies // 100 cents = pennies % 100 print("You have $", dollars, "and", cents, "cents") data_cal() #User input for answer repeat = input("Do you want to try again?") answer = ['yes','YES','Yes','y','Y'] #Loop for answer while repeat in answer data_cal() else: print("Bye then") I was thinking if I can