Commit ddea08eb by BellCodeEditor

save project

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