Commit a12ec481 by BellCodeEditor

save project

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