Commit 610e9f8d by BellCodeEditor

save project

parent 2c09f98c
Showing with 20 additions and 15 deletions
i=3
username = "pythotn"
userpassword = "123456"
word="gun"
words="12344321"
while True:
i-=1
name = input("请输入用户名:")
password = input("请输入密码:")
if name == username and password == userpassword:
print("登录成功!")
break
elif name != username:
print("用户名错误,请重新输入")
print("你还剩"+str(i)+"机会")
if i>0:
words=input("请输入用户名")
wordes=input("请输入密码")
i=i-1
if word==words and words==wordes:
print("登录成功")
break
if word!=words:
print("用户名错误,请重新输入")
print("你还剩"+str(i)+"次机会")
continue
if words!=wordes:
print("密码错误,请重新输入")
print("你还剩"+str(i)+"次机会")
else:
print("密码错误,请重新输入")
print("你还剩"+str(i)+"机会")
print("欢迎来到贝尔编程!")
\ No newline at end of file
print("你的账户已锁定")
exit()
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