Commit a12ec481 by BellCodeEditor

save project

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