From 01ed095b849f10023080757a6438c7b408ffe2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E5=8D=93=E8=80=98?= Date: Tue, 17 Sep 2024 13:25:22 -0400 Subject: [PATCH] I changed the number of degree and distance and we try on the define function. fun and happy. at the begining of the coding, i felt nervous, and now i know the basic process of doing this assignment. --- drawing.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drawing.py b/drawing.py index f3ee2e9..ef952a4 100644 --- a/drawing.py +++ b/drawing.py @@ -7,16 +7,13 @@ from turtle import ( pendown, color, ) +def star(distance, degrees): + for side in range(5): + forward(distance) + right(degrees) -forward(100) -right(360 * 2 / 5) -forward(100) -right(360 * 2 / 5) -forward(100) -right(360 * 2 / 5) -forward(100) -right(360 * 2 / 5) -forward(100) -right(360 * 2 / 5) +for size in range(10, 100, 20): + star(size, 360*2/5) + input()