Commit 14b25482 by BellCodeEditor

save project

parent 370cf254
Showing with 31 additions and 5 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
import random,time,os
ok=0
i=3
username = "python"
userpassword = "123456"
while not i<0:
name=input("please input the username: ")
password=input("please input the password: ")
while True:
if (name==username) and (password==userpassword):
os.system("cls")
while True:
print("complete : %",ok)
ok=ok+random.randint(1,30)
time.sleep(random.randint(1,3))
os.system("cls")
if ok>=69:
print("complete : %100")
print("登录成功!")
exit()
else:
print("用户名或密码错误!还有",i,"次机会!")
i-=1
break
print("账户已锁定!")
exit()
# 请用input()实现用户输入账号、密码的功能
# 如果用户输入的账号、密码正确,提示登陆成功
\ 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