From 387b7baf151f60151bc4f3fbd1b77763639d7b78 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 26 Nov 2023 12:01:02 +0800 Subject: [PATCH] save project --- diy1.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/diy1.py b/diy1.py index 09a5883..6769b8b 100644 --- a/diy1.py +++ b/diy1.py @@ -1,13 +1,22 @@ # 利用write()帮助悟空给诺依回信吧~ +# 背景 import turtle -# pen=turtle.Pen() -# pen.write("你好\n诺依.",font=("Times",30,"normal")) -# pen.hideturtle() -# turtle.done() +screen = turtle.Screen() +screen.bgcolor("light blue") +# 写字 +pen=turtle.Pen() +pen.penup() +pen.goto(100,-100) +pen.write("你好,诺依~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n——悟空 ",font=("Times",13,"normal")) +pen.hideturtle() +# 爱心 pen1 = turtle.Pen() +pen1.pencolor("red") +pen1.pensize(5) pen1.left(45) pen1.forward(100) pen1.circle(50,180) pen1.right(90) pen1.circle(50,180) -pen1.forward(100) \ No newline at end of file +pen1.forward(100) +turtle.done() -- libgit2 0.25.0