Commit 28970541 by BellCodeEditor

save project

parent 21c349b6
Showing with 15 additions and 10 deletions
i=3
username = "python"
userpassword = "123456"
while True:
a=input("用户账号:")
b=input("账号密码:")
if a==username and b==userpassword:
print("登陆成功!")
break
else:
if username!=a:
print("用户名错误,请重新输入!")
continue
if i>0:
a=input("用户账号:")
b=input("账号密码:")
i-=1
if a==username and b==userpassword:
print("登陆成功!")
break
else:
print("密码错误,请重新输入!")
if username!=a:
print("用户名错误,请重新输入!")
continue
else:
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