Commit 804fc503 by BellCodeEditor

save project

parent be6e7cad
Showing with 26 additions and 13 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python"
userpassword = "123456" userpassword = "123456"
i=3
while True: while True:
name = input("请输入用户名:") if i>0:
password = input("请输入密码:")
if name == username and password == userpassword: name = input("请输入用户名:")
print("登录成功") password = input("请输入密码:")
print("SB世界") i -= 1
break if name == username and password == userpassword:
if name != username: print("登录成功")
print("用户名错误") print("SB世界")
if userpassword != "123456": break
print("密码错误") if name != username:
\ No newline at end of file print("温馨提示,你还剩"+str(i)+"机会")
print("用户名错误")
if userpassword != "123456":
print("温馨提示,你还剩"+str(i)+"机会")
print("密码错误")
if name != username and userpassword != "123456":
print("温馨提示,你还剩"+str(i)+"机会")
print("密码错误还有用户名错误")
else:
print("你是SB")
exit()
\ 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