Commit c216bbfb by BellCodeEditor

save project

parent c16a533d
Showing with 19 additions and 12 deletions
username = "1" # 保存在服务器数据库中的用户账号(正确的账号) username = "1" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "1" userpassword = "1"
while True: # 保存在服 i=3
name=input("请输入账号") while True:
password=input("请输入密码") if i>0: # 保存在服
if name==username and password==userpassword: name=input("请输入账号")
print('登陆成功') i-=1
break if name!=username:
if name!=username: print("账号错误")
print("账号错误") continue
if password!=userpassword: password=input("请输入密码")
print("密码错误") if name==username and password==userpassword:
print("登陆失败") print('登陆成功')
break
if password!=userpassword:
print("密码错误")
print("登陆失败")
else:
print("登录次数已用完")
print('欢迎登陆') print('欢迎登陆')
# 请用input()实现用 # 请用input()实现用
......
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