下面的代码不断跳过“TryAgainQuestion()”函数:::: 我真的需要一些帮助!!!它变得烦人
import time
ranname = "0"
def AskForName():
ranname = "1"
name = input("Please enter your name: ")
print("--------------------")
print(" .:: ",name," ::.")
print("--------------------")
print(" ")
time.sleep(2)
Start()
def TryAgainQuestion():
tryagain = input("Do you want to try again? (Y or N): ")
if (tryagain == "y" or "Y"):
AskForName()
else:
time.sleep(1)
print("Made By: Daniel Parker")
def Start():
if (ranname == "1"):
TryAgainQuestion()
if (ranname == "0"):
AskForName()
Start()
谢谢,丹