def register():
print("Register")
login = input("Enter login")
passwd = input("Enter password")
passwdacc = input("Accept password")
if passwdacc = passwd:
print("You have registered, now please sign up")
else:
print("Try again, passwords dont matches")
login2 = input("Enter login")
password = input("Enter password")
if password = passwd and login2 = login
print("Accepted")
else:
print("Try again")
サインアップ()
エラー、警告:
ファイル "source_file.py"、3行目login = input( "Enter login")^ IndentationError:unindentはどの外部インデントレベルとも一致しません
間違ったインデントは別として、条件ステートメントでは、代入演算子を比較演算子に置き換える必要があります。また、。:
からaが欠落していif statement
ます。
def register():
print("Register")
login = input("Enter login")
passwd = input("Enter password")
passwdacc = input("Accept password")
if passwdacc == passwd:
print("You have registered, now please sign up")
else:
print("Try again, passwords don't match")
login2 = input("Enter login")
password = input("Enter password")
if password == passwd and login2 == login:
print("Accepted")
else:
print("Try again")
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加