From 489676d286244405c9648ab440bb5ae8c9200d24 Mon Sep 17 00:00:00 2001 From: chenjinjia Date: Sat, 13 Jul 2024 09:18:35 +0800 Subject: [PATCH] Signed-off-by: chenjinjia --- .idea/.gitignore | 3 + .../inspectionProfiles/profiles_settings.xml | 6 + .idea/misc.xml | 7 ++ .idea/modules.xml | 8 ++ .idea/陈锦嘉.iml | 8 ++ 2024-7-10-1.py | 7 ++ 2024-7-10-2.py | 2 + 2024-7-10-3.py | 11 ++ 2024-7-10-4.py | 8 ++ 2024-7-11-1.py | 16 +++ 2024-7-11-2.py | 29 +++++ 2024-7-9-1.py | 13 ++ 2024-712-1.py | 113 ++++++++++++++++++ 13 files changed, 231 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/陈锦嘉.iml create mode 100644 2024-7-10-1.py create mode 100644 2024-7-10-2.py create mode 100644 2024-7-10-3.py create mode 100644 2024-7-10-4.py create mode 100644 2024-7-11-1.py create mode 100644 2024-7-11-2.py create mode 100644 2024-7-9-1.py create mode 100644 2024-712-1.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..359bb53 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..c956f2d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..487cabc --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/陈锦嘉.iml b/.idea/陈锦嘉.iml new file mode 100644 index 0000000..009eb11 --- /dev/null +++ b/.idea/陈锦嘉.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/2024-7-10-1.py b/2024-7-10-1.py new file mode 100644 index 0000000..712321f --- /dev/null +++ b/2024-7-10-1.py @@ -0,0 +1,7 @@ +import turtle +t=turtle.Turtle() +t.pensize(3) +t.speed(99999999999) +for n in range(10000): + t.forward(n*3) + t.right(100) \ No newline at end of file diff --git a/2024-7-10-2.py b/2024-7-10-2.py new file mode 100644 index 0000000..0fe66de --- /dev/null +++ b/2024-7-10-2.py @@ -0,0 +1,2 @@ +import turtle +your_name=turtle.textinput('输入姓名','你的姓名是') \ No newline at end of file diff --git a/2024-7-10-3.py b/2024-7-10-3.py new file mode 100644 index 0000000..744928e --- /dev/null +++ b/2024-7-10-3.py @@ -0,0 +1,11 @@ +import turtle +t=turtle.Turtle() +t.speed(0) +list=["red","green","blue","black","pink","gray","purple","orange","yellow","brown","silver","gold","indigo","cyan"] +n=int(turtle.numinput("边数","输入边数")) +for i in range(9999999): + t.pencolor(list[i%n]) + t.forward(i*4) + t.right(360/n+2) + t.pensize(i/100) +turtle.done() \ No newline at end of file diff --git a/2024-7-10-4.py b/2024-7-10-4.py new file mode 100644 index 0000000..723ef76 --- /dev/null +++ b/2024-7-10-4.py @@ -0,0 +1,8 @@ +import turtle +t=turtle.Turtle() +t.speed(0) +n=int(turtle.numinput("边数","输入边数")) +for i in range(360): + t.forward(i*3) + t.right(360/n+1) + t.pensize(i/100) \ No newline at end of file diff --git a/2024-7-11-1.py b/2024-7-11-1.py new file mode 100644 index 0000000..242b9c1 --- /dev/null +++ b/2024-7-11-1.py @@ -0,0 +1,16 @@ +import turtle +t=turtle.Turtle() +t.speed(0) +t.pensize(5) +list=["red","green","blue","pink","purple","orange"] +for i in range(6): + t.pencolor(list[i%6]) + t.penup() + t.goto(0,0) + t.pendown() + t.forward(100) + t.penup() + t.goto(0,0) + t.right(60) + +turtle.done() diff --git a/2024-7-11-2.py b/2024-7-11-2.py new file mode 100644 index 0000000..be60467 --- /dev/null +++ b/2024-7-11-2.py @@ -0,0 +1,29 @@ +import random#导入随鸡库 +import turtle#导入turtle库 +t=turtle.Turtle()#用t带替turtle +t.speed(0)#设置画笔速度 +t.pensize(3)#设置笔粗细 +list=["red","green","blue","pink","purple","orange"]#颜色 +for i in range(999):#外循环 + x=random.randint(-400,400)#让雪花在屏幕中随机移动 + y=random.randint(-400,400) + t.penup()#台笔 + t.goto(x,y)#goto随机地点 + t.pendown()#落笔 + step=random.randint(20,50)#建立随机库 + for i in range(6):#内循环 + t.pencolor(list[i % 6])#绘制雪花+随机雪花大小 + t.forward(step)#这是代码 + t.forward(-step/2)#这是代码 + t.right(60)#这是代码 + t.forward(step/3)#这是代码 + t.forward(-step/3)#这是代码 + t.left(120)#这是代码 + t.forward(step / 3)#这是代码 + t.forward(-step / 3)#这是代码 + t.right(60)#这是代码#这是代码#这是代码#这是代码#这是代码#这是代码#这是代码 + t.forward(-step/2)#这是代码 + t.right(60) + +turtle.done()#跳出循环+让雪花定在屏幕上#这是代码 +#会有重叠#这是代码 \ No newline at end of file diff --git a/2024-7-9-1.py b/2024-7-9-1.py new file mode 100644 index 0000000..f7c03cb --- /dev/null +++ b/2024-7-9-1.py @@ -0,0 +1,13 @@ +list=[0] +n=int(input()) +for i in range(n): + list.append(1) + for i in range(2,n+1): + for j in range(i ,n+1,i): + if i%j==0: + list[j]=1 + else: + list[j]=0 + for i in range(1,n+1): + if list[i]==0: + print (i,end=" ") \ No newline at end of file diff --git a/2024-712-1.py b/2024-712-1.py new file mode 100644 index 0000000..60e7806 --- /dev/null +++ b/2024-712-1.py @@ -0,0 +1,113 @@ +import turtle +t=turtle.Turtle() + +t.speed(20) +t.pensize(3) + +t.color("blue","blue") +t.goto(0,0) +t.circle(150) +t.begin_fill() +t.circle(150) +t.end_fill() + + +t.color("white","white") +t.circle(120) +t.begin_fill() +t.circle(120) +t.end_fill() + + +t.color('black','white') +t.penup() +t.goto(-40,200) +t.pendown() +t.begin_fill() +t.circle(34) +t.end_fill() + + +t.color('black','white') +t.penup() +t.goto(40,200) +t.pendown() +t.begin_fill() +t.circle(34) +t.end_fill() + + +t.color("red","red") +t.penup() +t.goto(4,140) +t.pendown() +t.begin_fill() +t.circle(20) +t.end_fill() + + +t.color('black') +t.penup() +t.goto(26,220) +t.pendown() +t.begin_fill() +t.circle(14) +t.fillcolor('black') +t.end_fill() + + +t.color('black') +t.penup() +t.goto(-30,220) +t.pendown() +t.begin_fill() +t.circle(14) +t.fillcolor('black') +t.end_fill() + + +t.color('white') +t.penup() +t.goto(26,235) +t.pendown() +t.begin_fill() +t.circle(3) +t.fillcolor('white') +t.end_fill() + + +t.color('white') +t.penup() +t.goto(-30,235) +t.pendown() +t.begin_fill() +t.circle(3) +t.fillcolor('white') +t.end_fill() + +t.color('black') +t.penup() +t.goto(-50,50) +t.pendown() +t.setheading(-30) +t.circle(90,90) + + +t.penup() +t.goto(23,120) +t.right(25) +t.pendown() +t.forward(75) +t.penup() +t.goto(23,115) +t.right(25) +t.pendown() +t.forward(75) +t.penup() +t.goto(23,110) +t.right(25) +t.pendown() +t.forward(75) + +t.hideturtle() +turtle.done() \ No newline at end of file