Commit 220177bb by BellCodeEditor

save project

parent b0b12391
Showing with 14 additions and 9 deletions
...@@ -5,11 +5,16 @@ while True: ...@@ -5,11 +5,16 @@ while True:
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
e=input("密码:") e=input("密码:")
while True: while True:
if w=="python" and e=="123456": if i>0:
input("登录成功") if w=="python" and e=="123456":
break input("登录成功")
elif name !=username: break
print("用户名错误") i-=1
else: if name !=username:
print("密码错误") print("失败")
# 如果登录成功用户输入的账号、密码正确,提示登陆成功 continue
\ No newline at end of file if password !=userpassword:
print("错误")
else:
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