Commit 64f610f1 by BellCodeEditor

save project

parent d826065f
Showing with 11 additions and 1 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python"
i=3 # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" userpassword = "123456"
while True: # 保存在服务器数据库中的用户密码(正确的密码) while True: # 保存在服务器数据库中的用户密码(正确的密码)
name=input("你是谁?") name=input("你是谁?")
...@@ -10,8 +11,16 @@ while True: # 保存在服务器数据库中的用户密码(正确的密码 ...@@ -10,8 +11,16 @@ while True: # 保存在服务器数据库中的用户密码(正确的密码
else: else:
if name != username and userpassword==password: if name != username and userpassword==password:
print("...用户名异常...") print("...用户名异常...")
i=i-1
if i==0:
print("...停机...")
break
else: else:
print("...密码异常...") print("...密码异常...")
i=i-1
if i==0:
print("...停机...")
break
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
\ 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