Enter your password and save it in advance. Maximum number of password entries: 3 If the password is correct, you will be logged in If it's wrong, "Type it again." If you enter it 3 times and you get it wrong, it should be printed as 'Login Failed!' and then shut down. You can enter it three times, but even if you get it wrong, it only says "Login".
i = 0
while i < 3:
▽ input input ("Password :").
password = "iloveyou"
if input == "iloveyou":
Print ("log in!")
break
elif i > 3:
Print, " failed logins! More than the number! ")
i += 1
else:
Print ("Please enter the password again.").
i += 1
The original code is to assign a password to password and to verify that password exists. You need to check if the input is the same as password.
i = 0
while i < 3:
▽ input input ("Password :").
password = "iloveyou"
if input == password:
Print ("log in!")
break
elif i > 3:
Print, " failed logins! More than the number! ")
i += 1
else:
Print ("Please enter the password again.").
i += 1
924 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
584 PHP ssh2_scp_send fails to send files as intended
614 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.