Commit 5a31e48e by BellCodeEditor

auto save

parent 39d26b9f
Showing with 18 additions and 8 deletions
#username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
#userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
user=input("请输入你的账号") user=input("请输入你的账号")
passw=input("请输入你的密码") passw=input("请输入你的密码")
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
if user==username and passw==userpassword:
print("登陆成功") i=2
else: while i>0:
print("账号密码错误") if user==username and passw==userpassword:
\ No newline at end of file print("登陆成功")
break
else:
print("账号密码错误")
i=i-1
user=input("请输入你的账号")
passw=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