Commit 82219dcb by BellCodeEditor

save project

parent ed9b0db7
Showing with 7 additions and 5 deletions
...@@ -7,17 +7,19 @@ while True: ...@@ -7,17 +7,19 @@ while True:
i-=1 i-=1
if name!=username: if name!=username:
print("账号错误") print("账号错误")
print("剩余"+str(i)+"次")
continue continue
password=input("请输入密码") password=input("请输入密码")
if name==username and password==userpassword:
print('登陆成功')
break
if password!=userpassword: if password!=userpassword:
print("密码错误") print("密码错误")
print("剩余"+str(i)+"次")
if name==username and password==userpassword:
print('登陆成功')
break
print("登陆失败") print("登陆失败")
else: else:
print("登录次数已用完") print("登录次数已用完")
exit()
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