diff --git a/diy1.py b/diy1.py index a0bcbc0..e609a18 100644 --- a/diy1.py +++ b/diy1.py @@ -1,19 +1,20 @@ #利用write()帮助悟空给诺依回信吧~ import turtle screen=turtle.Screen() -screen.bgcolor("blue") +screen.bgcolor("blue") +len=screen.textinput("提示","多大") pen=turtle.Pen() pen.penup() pen.goto(100,-100) pen.write("你\n好",font=("times",20,"normal")) pen1=turtle.Pen() -len=50 +lovesize=int(len) pen1.pensize(5) pen1.pencolor("red") pen1.left(45) -pen1.forward(2*len) -pen1.circle(len,180) +pen1.forward(2*lovesize) +pen1.circle(lovesize,180) pen1.right(90) -pen1.circle(len,180) -pen1.forward(2*len) +pen1.circle(lovesize,180) +pen1.forward(2*lovesize) turtle.done()