Commit 610e9f8d by BellCodeEditor

save project

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