diff --git a/diy1.py b/diy1.py index 37bc404..218144a 100644 --- a/diy1.py +++ b/diy1.py @@ -11,19 +11,20 @@ pen_a.pensize(1) pen_a.penup() pen_a.goto(100,-100) #写字 -pen_a.write("好\n一\n点",font=("Times",30,"normal")) +word=screen.textinput("字","写啥?") +pen_a.write(word,font=("Times",30,"normal")) #隐藏画笔 pen_a.hideturtle() - #准备画笔 +color=screen.textinput("颜色","啥色?") pen_b=turtle.Pen() -pen_b.color("red") +pen_b.color(color) pen_b.speed(99) pen_b.pensize(1) #画圆 len=screen.textinput("爱心大小","爱心多大?") len=int(len) -pen_b.fillcolor("red") +pen_b.fillcolor(color) pen_b.begin_fill() pen_b.left(45) pen_b.forward(2*len)