zz這到底是什么錯誤啊
uj5u.com熱心網友回復:
我知道哪錯了...uj5u.com熱心網友回復:
print("- - - - - - - 注冊- - - - - - - - - - - ")a=input("請輸入您注冊的用戶名:")
b=int(input("請輸入密碼"))
print("注冊成功")
print(" - - - - - - - - 登陸- - - - - - - - - - ")
c=input("請輸入您登陸的用戶名:")
d=int(input("請輸入您的登陸的密碼"))
if ((a==c) and (b==d)):
print("登陸成功")
else:
print("登陸失敗!")
uj5u.com熱心網友回復:
這樣改我漏了括號,下次細心,不然真的做不了這一行業uj5u.com熱心網友回復:
自己能解決問題很棒,報錯資訊已經提出那行出錯了,本行沒有出錯,可以檢查下上下兩行代碼。
第7行少了個括號
第8行,可以不用括號
if a == c and b == d:
另外第1行,要是注冊左右的-能對稱,看起來能舒服不少
uj5u.com熱心網友回復:
謝謝你的幫助!轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/82745.html
上一篇:關于提高單元測驗的覆寫率
下一篇:求大神解答
