Commit 13c2159c by BellCodeEditor

save project

parent 5d659180
Showing with 20 additions and 12 deletions
i=5
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
username = "python"
userpassword = "123456"
while True: while True:
name = input("请输入用户名:") if i>0:
password = input("请输入密码:") name = input("Please enter your user name:")
if name == username and password == userpassword: password = input("Please enter your password:")
print("登录成功!") if name == username and password == userpassword:
break print("Login successful!>_—")
elif name != username: break
print("用户名不存在,请重新输入!") elif name != username:
print("Username error!Login failed![>_<]")
else:
print("Password error!login failed![>_<]")
if i==1:
print("You still have"+str(i)+"chance")
if a>1:
print("You still have"+str(i)+"chances")
else: else:
print("密码输入有误,请重新输入!") print("Sorry,your account is locked!(—_<)")
print("欢迎来到贝尔编程!") exit()
\ No newline at end of file i-=1
print("Welcome to YQ plannet ! {>_—}")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment