Commit 729b76d3 by BellCodeEditor

auto save

parent 2f38ac63
Showing with 56 additions and 19 deletions
i = 3
username = '123456'
userpassword = '0000'
while True:
if i > 0:
name=input("请输入账号")
password = input("请输入密码")
i = i - 1
if name == username and userpassword == password:
print("王者荣耀登录成功")
break
if name != username:
print('账号错误请重新输入')
print("温馨提示,你还有"+str(i)+"次机会")
continue
if password != userpassword:
print('密码错误请重新输入')
print("温馨提示,你还有"+str(i)+"次机会")
else:
print("3次机会已用完,账号已被锁定")
exit()
print("欢迎来到王者荣耀")
\ No newline at end of file
#bros = ['汤苏颢','杨景行','王皓辰','钢镚']
#bros.pop(0)
#bros.remove('王皓辰')
#print(bros)
#list = ['老杨','钢镚']
#list.insert(0,'牛牛')
#list.append('老王')
#print(list)
#list1 = ['天','地','玄','黄','宇','宙','洪','荒']
name = "老师"
power = 25
bros = ['汤苏颢',10,'杨景行',15,'王皓辰',20,'钢镚',25]
for i in range(len(bros)):
if i%2 == 1 and bros[i]>=power:
bros.insert(i-1,name)
bros.insert(i,power)
break
print(bros)
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) import turtle
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) p = turtle.Pen()
p.speed(100)
# 请用input()实现用户输入账号、密码的功能 s = turtle.Screen()
s.bgcolor("black")
while True: c = ["green","red","yellow","pink"]
name = input("请输入账号") for i in range(1,301):
password = input("请输入密码") p.pencolor(c[i%4])
if name == username and userpassword == password: p.forward(i)
print("登陆成功") p.right(91)
break p.hideturtle()
if name != username: turtle.done()
print("用户名错误,请重新输入") \ No newline at end of file
continue
if userpassword != password:
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