Commit 3be69ae0 by BellCodeEditor

auto save

parent 75ca2e01
Showing with 63 additions and 2 deletions
#导入
import turtle
#创建画笔
pen = turtle.Pen()
#创建屏幕
screen = turtle.Screen()
#改变背景颜色
screen.bgcolor("light blue")
#改变画笔速度
pen.speed(1000)
#改变画笔颜色
pen.color("red")
#抬笔
pen.penup()
#转移阵地
#pen.goto(100,100)
pen.setpos(100,150)
#落笔
pen.pendown()
#填充颜色
pen.fillcolor("yellow")
#开始填充
pen.begin_fill()
#画太阳花
for i in range(36):
pen.forward(200)
pen.left(170)
#结束填充
pen.end_fill()
#隐藏画笔
pen.hideturtle()
#保存画布
turtle.done()
...@@ -33,4 +33,4 @@ p.end_fill() ...@@ -33,4 +33,4 @@ p.end_fill()
#隐藏画笔 #隐藏画笔
p.hideturtle() p.hideturtle()
#保存画布 #保存画布
turtle.done() turtle.dononre()
\ No newline at end of file \ No newline at end of file
#导入
import turtle
#创建画笔
p = turtle.Pen()
#改变画笔形状
p.shape("turtle")
#改变画笔颜色
p.color("red")
#填充颜色
p.fillcolor("red")
#开始填充
p.begin_fill()
#控制画笔移动 画五角星
for i in range(5):
p.forward(100)
p.left(144)
#结束填充
p.end_fill()
#隐藏画笔
p.hideturtle()
#保存画布
turtle.done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment