Commit 388be7db by BellCodeEditor

save project

parent 9d8647fb
Showing with 24 additions and 21 deletions
username = "python" i=3
userpassword = "123456" username = "RPG"
while True: userpassword = "123456"
if i>0: while True:
name = input("请输入用户名:") if i>0:
password = input("请输入密码:") a=str(i)
i=i-1 print("还有"+a+"次机会")
if name == username and password == userpassword: name = input("请输入用户名:")
print("登录成功!") password = input("请输入密码:")
break i=i-1
else: if name == username and password == userpassword:
if name != username: print("登录成功!")
print("用户名错误!请重新输入") break
continue else:
if password != userpassword: if name != username:
print("密码错误!请重新输入") print("用户名错误!请重新输入")
print("用户名和密码错误!请重新输入") continue
else: if password != userpassword:
print("用户已被锁定") print("密码错误!请重新输入")
print("欢迎来到贝尔编程!") print("用户名和密码错误!请重新输入")
\ No newline at end of file else:
print("用户已被锁定")
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