Commit da4e63ac by BellCodeEditor

save project

parent 858d41e7
Showing with 3 additions and 5 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python"
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456"
# 请用input()实现用户输入账号、密码的功能
while True: while True:
yourname=input("输入") yourname=input("输入")
yourpassword=input("输入密码") yourpassword=input("输入密码")
if username==yourname and userpassword==yourpassword: if username==yourname and userpassword==yourpassword:
print("登录成功") print("登录成功")
break break
if username!=yourname: if username!=yourname:
print("用户名错误!!!!!") print("用户名错误!!!!!")
continue
if userpassword!=yourpassword: if userpassword!=yourpassword:
print("密码!!!!!") 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