Commit ddea08eb by BellCodeEditor

save project

parent 4f88f50e
Showing with 11 additions and 4 deletions
i=3
username = "1" # 保存在服务器数据库中的用户账号(正确的账号) username = "1" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "1" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "1" # 保存在服务器数据库中的用户密码(正确的密码)
while True: while True:
if i>0:
name=input('输入账号') name=input('输入账号')
i-=1
if username!=name:
print('账号不存在')
continue
password=input('输入密码') password=input('输入密码')
if userpassword!=password:
print('密码错误')
if username==name and userpassword==password: if username==name and userpassword==password:
print('登录成功') print('登录成功')
break break
if username!=name: else:
print('用户名称错误') print('登录次数用完')
if userpassword!=password: exit()
print('密码错误')
print("欢迎加入") print("欢迎加入")
......
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