Commit cd06b6d1 by BellCodeEditor

save project

parent 91c737fb
Showing with 15 additions and 11 deletions
i=0
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" userpassword = "123456"
while True # 保存在服务器数据库中的用户密码(正确的密码) while True # 保存在服务器数据库中的用户密码(正确的密码)
name = input("请输入用户账号:") if i<3:
password = input("请输入用户密码:") name = input("请输入用户账号:")
if name == username and password == userpassword: password = input("请输入用户密码:")
print("登录成功") if name == username and password == userpassword:
break print("登录成功")
# 如果用户输入的账号、密码正确,提示登陆成功 break
if username != name: # 如果用户输入的账号、密码正确,提示登陆成功
print("用户输入错误!请重新输入") if username != name:
else: print("用户输入错误!请重新输入")
if userpassword != password if userpassword != password
print("用户密码输入错误!请重新输入") print("用户密码输入错误!请重新输入")
else:
exit
print("欢迎来到贝尔编程") 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