Commit fc9a6037 by BellCodeEditor

save project

parent 6cf1cd6d
Showing with 6 additions and 6 deletions
i=3 i=3
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" userpassword = "123456"
while True: # 保存在服务器数据库中的用户密码(正确的密码) while True:
mame=input("请输入账号:") if i>0: # 保存在服务器数据库中的用户密码(正确的密码)
password=input("请输入密码:") mame=input("请输入账号:")
if i>0: password=input("请输入密码:")
i=i-1
if mame==username and password==userpassword: if mame==username and password==userpassword:
print("登录成功") print("登录成功")
break break
i=i-1
if mame!=username: if mame!=username:
print("用户账号错误,请重新输入!") print("用户账号错误,请重新输入!")
continue continue
...@@ -16,7 +16,7 @@ while True: # 保存在服务器数据库中的用户密码(正确的密码 ...@@ -16,7 +16,7 @@ while True: # 保存在服务器数据库中的用户密码(正确的密码
print("用户密码错误,请重新输入!") print("用户密码错误,请重新输入!")
else: else:
print("登录次数已用完") print("登录次数已用完")
eixt() 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