Commit d139ed45 by BellCodeEditor

auto save

parent 3be69ae0
Showing with 71 additions and 0 deletions
#导入模块
import turtle
#创建画笔
p = turtle.Pen()
#改变画笔颜色
p.color("red")
#改变画笔形状
p.shape("turtle")
#填充颜色
p.fillcolor("red")
#开始填充
p.begin_fill()
#画五角星
for i in range(5):
#画笔移动
p.forward(200)
#画笔旋转
p.left(144)
#结束填充
p.end_fill()
#隐藏画笔
p.hideturtle()
#保存画布
turtle.done()
#导入模块
import turtle
#创建画笔
pen = turtle.Pen()
#改变背景颜色,创建屏幕
screen = turtle.Screen()
#改变背景颜色
screen.bgcolor("pink")
#改变画笔颜色
pen.color("red")
#改变画笔速度
pen.speed(1000)
#抬笔
pen.penup()
#转移阵地
pen.goto(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()
\ No newline at end of file
name = "晴天柱"
word = "欢迎你"
print(name + word)
print(type(name))
\ 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