Signed-off-by: chenjinjia <chenjinjia@1.com>

This commit is contained in:
chenjinjia 2024-07-13 09:18:35 +08:00
commit 489676d286
13 changed files with 231 additions and 0 deletions

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# 默认忽略的文件
/shelf/
/workspace.xml

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12 (PyCharmLearningProject)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (PyCharmLearningProject)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/陈锦嘉.iml" filepath="$PROJECT_DIR$/.idea/陈锦嘉.iml" />
</modules>
</component>
</project>

8
.idea/陈锦嘉.iml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.12 (PyCharmLearningProject)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

7
2024-7-10-1.py Normal file
View File

@ -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)

2
2024-7-10-2.py Normal file
View File

@ -0,0 +1,2 @@
import turtle
your_name=turtle.textinput('输入姓名','你的姓名是')

11
2024-7-10-3.py Normal file
View File

@ -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()

8
2024-7-10-4.py Normal file
View File

@ -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)

16
2024-7-11-1.py Normal file
View File

@ -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()

29
2024-7-11-2.py Normal file
View File

@ -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()#跳出循环+让雪花定在屏幕上#这是代码
#会有重叠#这是代码

13
2024-7-9-1.py Normal file
View File

@ -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=" ")

113
2024-712-1.py Normal file
View File

@ -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()