Commit abd038ba by BellCodeEditor

save project

parent 6d197e0c
Showing with 9 additions and 3 deletions
username = "python"
userpassword = "123456"
i=5
while True:
if i>0:
i-=1
name = input("请输入用户名:")
password = input("请输入密码:")
if name == username and password == userpassword:
......@@ -8,10 +11,13 @@ while True:
break
if name != username:
print("用户名错误,请重新登录")
continue
if password != userpassword:
print("剩下"+str(i)+"尝试机会")
elif password != userpassword
print("密码错误,请重新登录")
print("用户名和密码错误!请重新输入")
print("剩下"+str(i)+"尝试机会")
else:
print("输入次数以超出上限,请拿生分证来我司解锁!")
exit()
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