diff --git a/diy1.py b/diy1.py index af86f4a..12a8b8f 100644 --- a/diy1.py +++ b/diy1.py @@ -1,6 +1,7 @@ -# 利用write()帮助悟空给诺依回信吧~ +# 利用write() import turtle screen=turtle.Screen() +len=int(screen.textinput("提示","你想要多大的爱心:")) screen.bgcolor("light blue") pen=turtle.Pen() pen.write("你好\n诺伊.",font=("Times",30,"normal")) @@ -10,7 +11,6 @@ pen.goto(100,100) pen.pendown() pen.pensize(5) pen.pencolor("red") -len = 60 pen.left(45) pen.forward(2*len) pen.circle(len,180)