Commit d3e6c40e by BellCodeEditor

save project

parent d0495557
Showing with 6 additions and 17 deletions
...@@ -2,29 +2,19 @@ import turtle ...@@ -2,29 +2,19 @@ import turtle
pen1 = turtle.Pen() pen1 = turtle.Pen()
pen1.penup() pen1.penup()
pen1.goto(100,-100) pen1.goto(100,-100)
# \n 换行 pen1.write("山本我日你仙人\n给句痛快话\n投降不投降",
pen1.write("123457\n89456\n341132",
font=("Times",10,"normal")) font=("Times",10,"normal"))
# 拿画笔
pen = turtle.Pen() pen = turtle.Pen()
# 拿背景
screen = turtle.Screen() screen = turtle.Screen()
# 设置背景颜色 #值=(1-9 a-f) 6位 3位 adf = aaddff
screen.bgcolor("#abcdef") screen.bgcolor("#abcdef")
# 设置画笔颜色
pen.color("red") pen.color("red")
# 设置画笔粗细
pen.pensize(10) pen.pensize(10)
# 画爱心 len=int(screen.textinput("提示","输入爱心的大小:"))
pen.left(45) pen.left(45)
# 正方形边长为圆的直径:2*len pen.fd(2*len)
# fd = forword pen.circle(len,180)
pen.fd(100)
pen.circle(50,180)
pen.right(90) pen.right(90)
pen.circle(50,180) pen.circle(len,180)
pen.fd(100) pen.fd(2*len)
# 隐藏画笔
pen.hideturtle() pen.hideturtle()
# 保留画布
turtle.done() 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