print("welcome to the password reset program")
print("please enter the new password")
input("type your new password")
input("type your new password (8-16 characters)")
password = input("type your new password (8-16 characters)")
if password == <8
print("this is too short, rethink, and re-enter your new password...")
if password == >16
print("this is too long, rethink, and re-enter your new password...")
if password == 8-16
print("this is the correct length, now re-enter to confirm")
password2 = input("re-enter your password")
if password == password2
print("your password has been changed")
if password != password2
print("this is not the same as your first password")
我得到的錯誤與「如果密碼== < 8」 你能幫我嗎?我如何使這項工作?我不斷收到語法錯誤
檢查python文檔。在if之後你必須使用':'。像這樣''if some_value:' – metmirr
你在'if password == <8'行有'意想不到的縮進',並且你需要在行尾加上':' – Jaco
你應該考慮看看一些Python教程。 –