Commit 3c3be8ff by BellCodeEditor

save project

parent 5f32fad6
Showing with 6 additions and 7 deletions
...@@ -2,14 +2,13 @@ username = "python" ...@@ -2,14 +2,13 @@ username = "python"
userpassword = "123456" userpassword = "123456"
while True: while True:
username1=input("请输入用户名:") username1=input("请输入用户名:")
userpassword1=input("请输入密码:")
if username1==username and userpassword==userpassword1:
print("登录成功!")
break
if username1!=username: if username1!=username:
print("用户名不存在,请重新输入") print("用户名不存在,请重新输入")
continue continue
userpassword1=input("请输入密码:")
if userpassword1!=userpassword: if userpassword1!=userpassword:
print("密码错误,请重新输入") print("密码错误,请重新输入")
print("欢迎来到贝尔编程!") if username1==username and userpassword==userpassword1:
\ No newline at end of file print("登录成功!")
break
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