ユーザーが Y/N を入力して続行するかどうかを尋ねる単純なゲームを実行しています。しかし、ユーザーがそれ以外の何かを入力した場合、質問をループさせたいと思います。どうすればいいですか?
def start():
print "Hello there."; time.sleep(.5)
myname = raw_input("What is your name? "); time.sleep(.5)
print "Welcome %s, this is..." %myname; time.sleep(.5)
uname = myname.upper()
print "\t\t\tTHE ADVENTURES OF %s" %uname
choice0 = raw_input("\nWould you like to play the game? Y/N ")
if choice0 == "Y":
gameon
if choice0 == "N":
print "Alright, bye!"
else:
print "Invalid input."