Commit df19a08b by BellCodeEditor

auto save

parent 370cf254
Showing with 75 additions and 8 deletions
"""
a=["关羽","刘备","张飞"]
a.insert(2,"赵云")
a.append("马超")
a.extend(["黄忠","魏延"])
print(a)
"""
"""
a=[0,1,2,3,4,5,6]
b=[0,1,4,5,6,7,8,9,10]
a.extend(b[0:-3])
print(a)
"""
a=[0,100]
while True:
b=input("请输入0——100的数字可以是小数\n")
c=int(b)
for i in range(len(a)):
if c>a[i] and c not in a:
a.insert(i,c)
break
print(a)
\ No newline at end of file
x=username="hmh"
y=userpassword="219"
i=0
j=0
while True:
if i==3:
exit(0)
if i==1:
print("你还有二次机会")
if i==2:
print("你还有一次机会")
a=input("请输入用户名\n")
if a==x:
break
else:
i=i+1
print("用户名错误")
while True:
if j==3:
exit(0)
if j==1:
print("你还有二次机会")
if j==2:
print("你还有一次机会")
b=input("请输入密码\n")
if b==y:
break
else:
j=j+1
print("密码错误")
print("登录成功")
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) """
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) import turtle
a=turtle.Pen()
b=["pink","purple","yellow","green"]
c=turtle.Screen()
c.bgcolor("black")
for i in range(520):
a.pencolor(b[i%4])
a.forward(i)
a.right(91)
a.hideturtle()
turtle.done()
"""
j=1
i=1
for i in range(1,10):
for j in range(1,i+1):
print(j,"x",i,"=",j*i,sep="",end=" ")
print()
# 请用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