From f379eb8d6cc308ed9ad038a324978ecb9df5b7a9 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Thu, 11 Jul 2024 10:36:11 +0800 Subject: [PATCH] save project --- diy1.py | 44 +++++++++++++++++++++++++------------------- diy2.py | 0 2 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 diy2.py diff --git a/diy1.py b/diy1.py index 85ce3b6..17ec400 100644 --- a/diy1.py +++ b/diy1.py @@ -1,22 +1,28 @@ -# 利用write()帮助悟空给诺依回信吧~ import turtle +import random +list=[10,20,30,40,50] +d=random.choice(list) +a=turtle.Pen() screen=turtle.Screen() +a.penup() +a.goto(-70,-140) +a.hideturtle() +a.pendown() +len=screen.textinput("请填写:","你想要多大的?(最大85)") +n=int(len) +a.write(len+"步"+"\n好的!",font=("times",40,"normal")) +a1=turtle.Pen() screen.bgcolor("light blue") -len=screen.textinput("100","100") -len=int(len) -pen=turtle.Pen() -pen.write("你好\nSB.",font=("Times",30,"normal")) -pen.hideturtle() -len=60 -pen.penup() -pen.goto(100,100) -pen.pendown() -pen.pensize(5) -pen.pencolor("red") -pen.left(45) -pen.forward(2*len) -pen.circle(len,180) -pen.right(90) -pen.circle(len,180) -pen.forward(2*len) -turtle.done() +a1.fillcolor("red") +a1.begin_fill() +a1.hideturtle() +a1.pensize(5) +a1.pencolor("red") +a1.left(45) +a1.forward(2*n) +a1.circle(n,180) +a1.right(90) +a1.circle(n,180) +a1.forward(2*n) +a1.end_fill() +turtle.done() \ No newline at end of file diff --git a/diy2.py b/diy2.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/diy2.py -- libgit2 0.25.0