From eee0927ce95a97e183b9b887eb33f13ab17b5770 Mon Sep 17 00:00:00 2001 From: 10_2 Date: Wed, 17 Jul 2024 10:04:45 +0800 Subject: [PATCH] 10-2 --- 2024.7.17.1.py | 11 +++++++++++ 2024.7.17.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 2024.7.17.1.py create mode 100644 2024.7.17.py diff --git a/2024.7.17.1.py b/2024.7.17.1.py new file mode 100644 index 0000000..924d36a --- /dev/null +++ b/2024.7.17.1.py @@ -0,0 +1,11 @@ +import turtle #将turtle函数启动 +turtle.forward()#前进 +turtle.backward#后退 +turtle.Turtle()#将turtle的功能赋值给XXX +turtle.done()#结束绘制并将画面停留 +turtle.penup()#抬笔 +turtle.pendown()#落笔 +turtle.begin_fill()#开始填充 +turtle.fillcolor()#填充颜色 +turtle.end_fill()#结束填充 +turtle.circle()#画圆 \ No newline at end of file diff --git a/2024.7.17.py b/2024.7.17.py new file mode 100644 index 0000000..5c122ae --- /dev/null +++ b/2024.7.17.py @@ -0,0 +1,44 @@ +import turtle +t=turtle.Turtle() +t.begin_fill() +t.color('blue') +t.circle(100) +t.filling() +t.end_fill() +t.begin_fill() +t.color('white') +t.circle(80) +t.filling() +t.end_fill() +t.penup() +t.goto(0,90) +t.pendown() +t.begin_fill() +t.color('red') +t.circle(15) +t.filling() +t.end_fill() +t.pencolor('black') +t.right(90) +t.forward(60) +t.penup() +t.backward(125) +t.pendown() +t.begin_fill() +t.circle(15) +t.fillcolor('white') +t.filling() +t.end_fill() +t.penup() +t.left(90) +t.forward(2) +t.right(90) +t.pendown() +t.begin_fill() +t.circle(8) +t.fillcolor('black') +t.end_fill() +t.begin_fill() +t.circle(5) + +turtle.done()