From 4d4bf5bfacbdf89656afe70d59aa659ef373c56f Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 10 Jul 2022 14:53:46 +0800 Subject: [PATCH] save project --- diy.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 diy.py diff --git a/diy.py b/diy.py new file mode 100644 index 0000000..6d9d953 --- /dev/null +++ b/diy.py @@ -0,0 +1,13 @@ +# 答案 +import turtle + +pen = turtle.Pen() +color=input("你想要什么颜色的五角星呀?") +pen.fillcolor(color) +#绘制五角星# +pen.begin_fill() +for i in range(5): #重复执行5次 + pen.forward(200) #向前移动200步 + pen.right(144) #向右移动144度,注意这里的参数一定不能变 +pen.end_fill() #结束填充红色 +turtle.done() \ No newline at end of file -- libgit2 0.25.0