Commit c19e3c8d by BellCodeEditor

auto save

parent 1fed6083
Showing with 19 additions and 15 deletions
i
a = "曹哲源"
b = "czy20080901"
while True:
n = input("请输入用户名:")
s = input("请输入密码:")
if n == a and s == b:
print("登录成功")
break
if n != a:
print("用户名错误,请重新输入!")
break
if s!= b:
print("密码错误")
break
\ No newline at end of file
i=3
username = "python"
userpassword = "123456"
while True:
if i>0:
name = input("请输入用户名:")
password = input("请输入密码:")
i-=1
if name == username and password == userpassword:
print("登录成功!")
break
if name != username:
print("您输入的用户名错误请重新输入")
continue
if password != userpassword:
print("您输入的密码错误请重新输入")
uif name != usurname:
else:
print("账户已锁定")
exit()
......
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