Commit a88019e0 by BellCodeEditor

save project

parent 0b70f5ae
Showing with 24 additions and 9 deletions
......@@ -2,16 +2,30 @@ username = "python" # 保存在服务器数据库中的用户账号(正确
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能
i=3
while True:
a=input("你的账号是什么")
b=input("密码是什么")
if a==username and b==userpassword:
print("登录成功")
break
elif a==username:
print("账号错误")
continue
if i>0:
a=input("你的账号是什么")
b=input("密码是什么")
if a==username and b==userpassword:
print("登录成功")
break
elif not a==username:
print("账号错误")
i-=1
print('_'*75)
print("还有"+str(i)+"次数量")
print('_'*75)
continue
else:
print("密码错误")
i-=1
print('_'*75)
print("还有"+str(i)+"次数量")
print('_'*75)
p
else:
print("密码错误")
print("gun吧")
exit()
print("欢迎")
# 如果用户输入的账号、密码正确,提示登陆成功
\ 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