1 回答

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超9個(gè)贊
正如其他人指出的,您需要首先定義,然后調(diào)用函數(shù):
# imports first
# now definitions of functions
def start():
login_signin_Confirmation = input("Welcome! Do you wish to log-in to your account or sign up to this platform? \n")
if login_signin_Confirmation == "login":
login()
else:
signup()
def signup():
pass
def login():
login_username = input("Great! start by typing in your username.")
if login_username in users:
print("Welcome Back, {login_username}")
# main
def main():
start()
# guard multiprocess context
if __name__ == '__main__':
main()
添加回答
舉報(bào)