Signed-off-by: 10-1 <sairate@sina.cn>

This commit is contained in:
10-1 2024-07-22 16:59:27 +08:00
commit 26ab2cb718
23 changed files with 366 additions and 0 deletions

22
24-05-31-1.py Normal file
View File

@ -0,0 +1,22 @@
import time
def ab():
print('''
***************操作界面***************
1.查会员
2.增会员
3.删会员
4.退出
''')
c=input()
if c==1:
a=input("名字?")
b=input("密码?")
if a=="QWERTY"and b=="3.14159265358979323846264338":
print("您是管理员,请管理")
else:
print("您不是管理员")
time.sleep(2)

7
24-6-16-1.py Normal file
View File

@ -0,0 +1,7 @@
a=""
x=int(input())
for i in range(2,x):
if x%i==0:
a="不是"
break
print(a)

2
24-6-2-1.py Normal file
View File

@ -0,0 +1,2 @@
a=(1,2,3,4,5,6,7,8,9)
print(a[0:10:2])

2
24-6-2-2.py Normal file
View File

@ -0,0 +1,2 @@
a=(1,2,3,[7,8,9])
print(9)

5
24-6-2-3.py Normal file
View File

@ -0,0 +1,5 @@
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print((d-b)+(60*c-60*a))

3
24-6-2-4.py Normal file
View File

@ -0,0 +1,3 @@
n=int(input())
a=int[(input())]
print(a)

19
24-6-21-1.py Normal file
View File

@ -0,0 +1,19 @@
a=input()
b=input()
c=input()
d=b.split(",")
e=c.split(",")
f="no"
w=""
o=sum(e)
k=d[1]
z=d[0]+1
if o>=k:
f="yes"
for i in range(1,z):
for j in range(1,z):
if e[i]==e[j]:
w=""
elif e[i]*e[j]%154==0 or e[i]*e[j]%147==0:
f="yes"
print(f)

10
24-6-26-1.py Normal file
View File

@ -0,0 +1,10 @@
import random
a=random.randint(1,100)#取数
b=int(input())
while a!=b:
if a>b:
print("")
else :
print("")
b=int(input())
print("对了")

9
24-6-26-2.py Normal file
View File

@ -0,0 +1,9 @@
n=input()
list1=n.split()
a=int(list1[0])
b=int(list1[1])
c=int(list1[2])
d=2
while a%d!=b%d or b%d!=c%d or a%d!=c%d:
d+=1
print(d)

32
24-6-27-1.py Normal file
View File

@ -0,0 +1,32 @@
b=int(input())
c=int(input())
import turtle
t=turtle.Turtle()
a=turtle.Turtle()
t.speed(0)
t.goto(0,0)
a.speed(0)
a.penup()
a.goto(200,0)
a.pendown()
t.left(90)
d=0
e=0
f=0
while 1:
for i in range(b):#for循环结构,range()函数迭代器list,tuple...
t.pencolor("black")
t.forward(c)
t.left(360/b)
a.pencolor("black")
a.forward(c)
a.left(360/b)
for i in range(b):#for循环结构,range()函数迭代器list,tuple...
t.pencolor("white")
t.forward(c)
t.left(360/b)
a.pencolor("white")
a.forward(c)
a.left(360/b)
a.backward(20)
turtle.down()

1
24-6-27-2.py Normal file
View File

@ -0,0 +1 @@
z

36
24-6-28-1.py Normal file
View File

@ -0,0 +1,36 @@
import turtle
t=turtle.Turtle()
t.speed(0)
t.color("red","red")
t.begin_fill()
t.penup
t.goto(-300,200)
t.pendown
t.goto(300,200)
t.goto(300,-200)
t.goto(-300,-200)
t.goto(-300,200)
t.end_fill()
def hua(size,x,y,angle=0):
t.penup()
t.goto(x,y)
t.setheading(angle)
t.pendown()
t.color("yellow","yellow")
t.begin_fill()
for i in range(5):
t.forward(size)
t.right(144)
t.forward(size)
t.left(72)
t.end_fill()
hua(30, -250, 150)
hua(9, -150, 180, 30)
hua(9, -130, 130, 45)
hua(9, -140, 80, 0)
hua(9, -200, 50, -30)
t.penup()
t.goto(0,-300)
t.pencolor("black")
t.pendown()
t.write('中国',font=("楷体","20","normal"))

31
24-6-28-2.py Normal file
View File

@ -0,0 +1,31 @@
b=int(input())
c=int(input())
import turtle
t=turtle.Turtle()
a=turtle.Turtle()
t.speed(0)
t.goto(0,0)
a.speed(0)
a.pencolor("white")
a.goto(200,0)
t.left(90)
while 1:
for i in range(b):#for循环结构,range()函数迭代器list,tuple...
t.pencolor("black")
t.forward(c)
t.left(360/b)
for i in range(b):#for循环结构,range()函数迭代器list,tuple...
t.pencolor("white")
t.forward(c)
t.left(360/b)
for i in range(10):
for i in range(b):#for循环结构,range()函数迭代器list,tuple...
a.pencolor("black")
a.forward(c)
a.left(360/b)
for i in range(b):#for循环结构,range()函数迭代器list,tuple...
a.pencolor("white")
a.forward(c)
a.left(360/b)
a.backward(20)
turtle.down()

12
24-6-29-1.py Normal file
View File

@ -0,0 +1,12 @@
a=input()
b="CCCCCCCCCC"
c=""
d=0
if len(a)==len(b):
for i in range(len(b)):
if a[i]==b[i]:
c=c+b[i]
d=d+10
else:
c=c+"X"
print(d,c)

36
24-6-29-2.py Normal file
View File

@ -0,0 +1,36 @@
n=int(input())
b="CCCCCCCCCC"
c=""
d=0
e=[]
f=[]
g=[]
o=[]
for i in range(n):
e.append(input())
for l in range(len(e)):
h=e[l]
if len(e[l])==len(b):#写的答案个数是否等于标准答案个数
for j in range(len(b)):#判断答案并计分
m=h[j]
if h[j]==b[j]:
c=c+b[j]
d=d+10
else:
c=c+"X"
f.append(d)
f.append(c)
else:
f.append(" ")
p=f[len(f)-2]
q=f[len(f)-1]
f.clear()
f.append(p)
f.append(q)
o=f.copy()
g.append(o)
f.clear()
c=""
d=0
for i in range(n):
print(g[i])

14
24-6-9-1.py Normal file
View File

@ -0,0 +1,14 @@
a=int(input())
b=a/3
c=a/3
d=a/3
b=b/2
c=c/2
d=d+b+c
d=d/2
b=b/2
c=c+b+d
c=c/2
d=d/2
b=b+c+d
print(b,c,d)

8
24-6-9-2.py Normal file
View File

@ -0,0 +1,8 @@
a=int(input())
b=a//100
c=(a-b*100)//50
d=(a-b*100-c*50)//20
e=(a-b*100-c*50-d*20)//10
f=(a-b*100-c*50-d*20-e*10)//5
g=(a-b*100-c*50-d*20-e*10-f*5)//1
print(b,"*100,",c,"*50,",d,"*20",e,"*10,",f,"*5,",g,"*1")

11
24-7-1-1.py Normal file
View File

@ -0,0 +1,11 @@
import turtle
c=["red","green","yellow"]
a=turtle.Turtle()
a.goto(0,0)
a.speed(0)
b=int(turtle.numinput("a","b"))
for i in range(360):
a.pencolor(c[i%3])
a.forward(i)
a.left(360/b+1)
turtle.down()

1
24-7-1-2.py Normal file
View File

@ -0,0 +1 @@
import turtle

26
24-7-3-1.py Normal file
View File

@ -0,0 +1,26 @@
import random
import turtle
t=turtle.Turtle()
t.pensize(5)
for i in range(50):
a=random.randint(20,40)
b=random.random()
c=random.random()
d=random.random()
x=random.randint(-300,300)
y=random.randint(-300,300)
for i in range(6):
t.pencolor(b,c,d)
t.penup()
t.goto(x,y)
t.left(60)
t.pendown()
t.forward(a)
t.left(30)
t.forward(a)
t.forward(-a)
t.right(60)
t.forward(a)
t.forward(-a)
t.left(30)
t.forward(a)

13
24-7-3-2.py Normal file
View File

@ -0,0 +1,13 @@
import turtle
t=turtle.Turtle()
t.forward(100)
t.right(60)
t.forward(80)
t.right(90)
t.forward(20)
t.right(90)
t.forward(60)
t.left(60)
t.forward(90)
t.right(90)
t.forward(40)

64
24-7-5-1.py Normal file
View File

@ -0,0 +1,64 @@
import turtle
t=turtle.Turtle()
t.speed(0)
t.penup()
t.goto(0,-100)
t.color("blue","blue")
t.pendown()
t.begin_fill()
t.circle(100)
t.end_fill()
t.penup()
t.goto(0,-95)
t.color("white","white")
t.pendown()
t.begin_fill()
t.circle(80)
t.end_fill()
t.penup()
t.goto(-25,45)
t.pendown()
t.begin_fill()
t.circle(20)
t.end_fill()
t.penup()
t.goto(25,45)
t.pendown()
t.begin_fill()
t.circle(20)
t.end_fill()
t.penup()
t.goto(-20,60)
t.color("black","black")
t.pendown()
t.begin_fill()
t.circle(10)
t.end_fill()
t.penup()
t.goto(20,60)
t.pendown()
t.begin_fill()
t.circle(10)
t.end_fill()
t.penup()
t.goto(0,10)
t.color("red","red")
t.pendown()
t.begin_fill()
t.circle(20)
t.end_fill()
t.penup()
t.goto(-45,-35)
t.begin_fill()
t.right(40)
t.pendown()
t.circle(80,90)
t.end_fill()
t.penup()
t.goto(-45,-35)
t.begin_fill()
t.seth(-90)
t.color("white","white")
t.pendown()
t.circle(80,40)
t.end_fill()

2
24-7-7-22.py Normal file
View File

@ -0,0 +1,2 @@
a={"小李":"96","小李":"94"}
print(a)