From 26ab2cb718c232fd5b93d8f98bf2ee2b79e98ac6 Mon Sep 17 00:00:00 2001 From: 10-1 Date: Mon, 22 Jul 2024 16:59:27 +0800 Subject: [PATCH] Signed-off-by: 10-1 --- 24-05-31-1.py | 22 ++++++++++++++++++ 24-6-16-1.py | 7 ++++++ 24-6-2-1.py | 2 ++ 24-6-2-2.py | 2 ++ 24-6-2-3.py | 5 ++++ 24-6-2-4.py | 3 +++ 24-6-21-1.py | 19 +++++++++++++++ 24-6-26-1.py | 10 ++++++++ 24-6-26-2.py | 9 ++++++++ 24-6-27-1.py | 32 ++++++++++++++++++++++++++ 24-6-27-2.py | 1 + 24-6-28-1.py | 36 +++++++++++++++++++++++++++++ 24-6-28-2.py | 31 +++++++++++++++++++++++++ 24-6-29-1.py | 12 ++++++++++ 24-6-29-2.py | 36 +++++++++++++++++++++++++++++ 24-6-9-1.py | 14 +++++++++++ 24-6-9-2.py | 8 +++++++ 24-7-1-1.py | 11 +++++++++ 24-7-1-2.py | 1 + 24-7-3-1.py | 26 +++++++++++++++++++++ 24-7-3-2.py | 13 +++++++++++ 24-7-5-1.py | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ 24-7-7-22.py | 2 ++ 23 files changed, 366 insertions(+) create mode 100644 24-05-31-1.py create mode 100644 24-6-16-1.py create mode 100644 24-6-2-1.py create mode 100644 24-6-2-2.py create mode 100644 24-6-2-3.py create mode 100644 24-6-2-4.py create mode 100644 24-6-21-1.py create mode 100644 24-6-26-1.py create mode 100644 24-6-26-2.py create mode 100644 24-6-27-1.py create mode 100644 24-6-27-2.py create mode 100644 24-6-28-1.py create mode 100644 24-6-28-2.py create mode 100644 24-6-29-1.py create mode 100644 24-6-29-2.py create mode 100644 24-6-9-1.py create mode 100644 24-6-9-2.py create mode 100644 24-7-1-1.py create mode 100644 24-7-1-2.py create mode 100644 24-7-3-1.py create mode 100644 24-7-3-2.py create mode 100644 24-7-5-1.py create mode 100644 24-7-7-22.py diff --git a/24-05-31-1.py b/24-05-31-1.py new file mode 100644 index 0000000..ff80d2d --- /dev/null +++ b/24-05-31-1.py @@ -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) diff --git a/24-6-16-1.py b/24-6-16-1.py new file mode 100644 index 0000000..6c73d22 --- /dev/null +++ b/24-6-16-1.py @@ -0,0 +1,7 @@ +a="是" +x=int(input()) +for i in range(2,x): + if x%i==0: + a="不是" + break +print(a) diff --git a/24-6-2-1.py b/24-6-2-1.py new file mode 100644 index 0000000..254b096 --- /dev/null +++ b/24-6-2-1.py @@ -0,0 +1,2 @@ +a=(1,2,3,4,5,6,7,8,9) +print(a[0:10:2]) diff --git a/24-6-2-2.py b/24-6-2-2.py new file mode 100644 index 0000000..97c2952 --- /dev/null +++ b/24-6-2-2.py @@ -0,0 +1,2 @@ +a=(1,2,3,[7,8,9]) +print(9) diff --git a/24-6-2-3.py b/24-6-2-3.py new file mode 100644 index 0000000..7f164cf --- /dev/null +++ b/24-6-2-3.py @@ -0,0 +1,5 @@ +a=int(input()) +b=int(input()) +c=int(input()) +d=int(input()) +print((d-b)+(60*c-60*a)) diff --git a/24-6-2-4.py b/24-6-2-4.py new file mode 100644 index 0000000..404fa7e --- /dev/null +++ b/24-6-2-4.py @@ -0,0 +1,3 @@ +n=int(input()) +a=int[(input())] +print(a) diff --git a/24-6-21-1.py b/24-6-21-1.py new file mode 100644 index 0000000..8e071d8 --- /dev/null +++ b/24-6-21-1.py @@ -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) diff --git a/24-6-26-1.py b/24-6-26-1.py new file mode 100644 index 0000000..e8ccadc --- /dev/null +++ b/24-6-26-1.py @@ -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("对了") diff --git a/24-6-26-2.py b/24-6-26-2.py new file mode 100644 index 0000000..1ad5039 --- /dev/null +++ b/24-6-26-2.py @@ -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) diff --git a/24-6-27-1.py b/24-6-27-1.py new file mode 100644 index 0000000..453356a --- /dev/null +++ b/24-6-27-1.py @@ -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() diff --git a/24-6-27-2.py b/24-6-27-2.py new file mode 100644 index 0000000..b680253 --- /dev/null +++ b/24-6-27-2.py @@ -0,0 +1 @@ +z diff --git a/24-6-28-1.py b/24-6-28-1.py new file mode 100644 index 0000000..bb7e4d9 --- /dev/null +++ b/24-6-28-1.py @@ -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")) diff --git a/24-6-28-2.py b/24-6-28-2.py new file mode 100644 index 0000000..e695dac --- /dev/null +++ b/24-6-28-2.py @@ -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() diff --git a/24-6-29-1.py b/24-6-29-1.py new file mode 100644 index 0000000..b88f1a2 --- /dev/null +++ b/24-6-29-1.py @@ -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) diff --git a/24-6-29-2.py b/24-6-29-2.py new file mode 100644 index 0000000..3e0bcd3 --- /dev/null +++ b/24-6-29-2.py @@ -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]) diff --git a/24-6-9-1.py b/24-6-9-1.py new file mode 100644 index 0000000..20b13f8 --- /dev/null +++ b/24-6-9-1.py @@ -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) diff --git a/24-6-9-2.py b/24-6-9-2.py new file mode 100644 index 0000000..b3640a8 --- /dev/null +++ b/24-6-9-2.py @@ -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") diff --git a/24-7-1-1.py b/24-7-1-1.py new file mode 100644 index 0000000..8696754 --- /dev/null +++ b/24-7-1-1.py @@ -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() diff --git a/24-7-1-2.py b/24-7-1-2.py new file mode 100644 index 0000000..0f83d8f --- /dev/null +++ b/24-7-1-2.py @@ -0,0 +1 @@ +import turtle diff --git a/24-7-3-1.py b/24-7-3-1.py new file mode 100644 index 0000000..88f2af5 --- /dev/null +++ b/24-7-3-1.py @@ -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) diff --git a/24-7-3-2.py b/24-7-3-2.py new file mode 100644 index 0000000..a15af7c --- /dev/null +++ b/24-7-3-2.py @@ -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) diff --git a/24-7-5-1.py b/24-7-5-1.py new file mode 100644 index 0000000..27835e8 --- /dev/null +++ b/24-7-5-1.py @@ -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() diff --git a/24-7-7-22.py b/24-7-7-22.py new file mode 100644 index 0000000..a0adba6 --- /dev/null +++ b/24-7-7-22.py @@ -0,0 +1,2 @@ +a={"小李":"96","小李":"94"} +print(a)