Commit 610af75f by BellCodeEditor

save project

parent 7577b481
Showing with 3 additions and 2 deletions
...@@ -2,14 +2,15 @@ import turtle ...@@ -2,14 +2,15 @@ import turtle
screen=turtle.Screen() screen=turtle.Screen()
o=screen.textinput("提示","你想要什么颜色的背景?输入一个颜色") o=screen.textinput("提示","你想要什么颜色的背景?输入一个颜色")
screen.bgcolor(o) screen.bgcolor(o)
i=screen.textinput("提示","你想要一个绿色爱心吗?输入一个数字") pp=screen.textinput("提示","你想要什么颜色的爱心吗?输入一个颜色")
i=screen.textinput("提示","你想要一个爱心吗?输入一个数字")
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(100,-100) pen.goto(100,-100)
pen.write("你好\nSB",font=("方正舒体",20,"normal")) pen.write("你好\nSB",font=("方正舒体",20,"normal"))
len=int(i) len=int(i)
pen1=turtle.Pen() pen1=turtle.Pen()
pen1.pencolor("green") pen1.pencolor(pp)
pen1.pensize(5) pen1.pensize(5)
pen1.left(45) pen1.left(45)
pen1.forward(len*2) pen1.forward(len*2)
......
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