Commit 1f761f65 by BellCodeEditor

auto save

parent 07858a54
Showing with 42 additions and 0 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
pen = turtle.Pen()
pen.write("你好",font=("time",30"normal"))
pen,hideturtle()
turtle.done()
# 拿画笔
pen = turtle.Pen()
# 拿背景
screen = turtle.Screen()
# 设置背景颜色 #值=(1-9 a-f) 6位 3位 adf = aaddff
screen.bgcolor("#abcdef")
# 设置画笔颜色
pen.color("red")
# 设置画笔粗细
pen.pensize(10)
# 画爱心
len = int(sereen.textinpiut("提示","请输入爱心的大小"))
pen.left(45)
# 正方形边长为圆的直径:2*len
# fd = forword
pen.fd(100)
pen.circle(50,180)
pen.right(90)
pen.circle(50,180)
pen.fd(100)
# 隐藏画笔
pen.hideturtle()
# 保留画布
turtle.done()
len = 25
pen.left(45)
pen.fd(2*len)
pen.circle(len,180)
pen.rt(90)
pen.circle(len,180)
pen.fd(2*len)
pen.hideturtle()
turtle.done()
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