Commit c827abe5 by BellCodeEditor

save project

parent 25f546d6
Showing with 14 additions and 10 deletions
...@@ -3,13 +3,17 @@ userpassword = "123456" ...@@ -3,13 +3,17 @@ userpassword = "123456"
while True: while True:
n = input("请输入用户名:") n = input("请输入用户名:")
p = input("请输入密码:") p = input("请输入密码:")
if n == username and p == userpassword: if n == username and p == userpassword:
print("登录成功!") i<0:
break print("登录成功!")
elif n!=username: break
print("用户名错误!") if n!=username:
else p!=userpassword: print("用户名错误!")
print("密码错误!") continue
print("欢迎来到贝尔编程!") if p!=userpassword:
print("密码错误!")
print("欢迎来到贝尔编程!")
else:
exit()
\ No newline at end of file \ 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