Commit 79986ddf by BellCodeEditor

save project

parent ff020650
Showing with 13 additions and 1 deletions
...@@ -6,4 +6,11 @@ while True: ...@@ -6,4 +6,11 @@ while True:
if name == username and password == userpassword: if name == username and password == userpassword:
print("登录成功!") print("登录成功!")
print("用户名和密码错误!请重新输入") print("用户名和密码错误!请重新输入")
if
print("欢迎来到贝尔编程!") print("欢迎来到贝尔编程!")
\ No newline at end of file
...@@ -3,8 +3,12 @@ userpassword = "123456" ...@@ -3,8 +3,12 @@ userpassword = "123456"
while True: while True:
username1=input("输入用户名") username1=input("输入用户名")
password1 = input("请输入密码:") password1 = input("请输入密码:")
if username1==username and userpassword==password1: if username1==username and password1==userpassword:
break break
print("输入错误,请重新输入") print("输入错误,请重新输入")
if username1!=username:
print("用户名输入错误,请重新输入")
if password1!=userpassword:
print("密码输入错误,请重新输入")
print("欢迎来到贝尔编程") print("欢迎来到贝尔编程")
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