Commit 7d7f5ab8 by BellCodeEditor

save project

parent da95604e
Showing with 16 additions and 10 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
i=3
# 请用input()实现用户 输入账号、密码的功能 # 请用input()实现用户 输入账号、密码的功能
name=input("名字") name=input("名字")
password=input("密码") password=input("密码")
while True: while True:
if username==name and userpassword==password : if i>=0:
print("恭喜进入") if username==name and userpassword==password :
break print("恭喜进入")
print("不对") break
elif username!=name print("不对")
print("名字不对") elif username!=name
else userpassword!=password : print("名字不对")
print("密码不对") i-=1
else userpassword!=password :
print("密码不对")
i-=1
else:
print("滚!!!")
exit()
print("恭喜进入") 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