From c729a6980100c35b635454221abe95cbe772e51b Mon Sep 17 00:00:00 2001 From: Ali Ghasemi Date: Fri, 11 Aug 2023 21:10:00 -0700 Subject: [PATCH 1/2] done! --- 02_06/ch2_challenge.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/02_06/ch2_challenge.py b/02_06/ch2_challenge.py index 11311d3..985db61 100644 --- a/02_06/ch2_challenge.py +++ b/02_06/ch2_challenge.py @@ -9,9 +9,11 @@ def draw_spiral(a_turtle, line_length): + if line_length > MAX_LENGTH: + return a_turtle.forward(line_length) a_turtle.right(90) - draw_spiral(a_turtle, INCREMENT) + draw_spiral(a_turtle, line_length + INCREMENT) charlie = turtle.Turtle(shape="turtle") From 5f7df01a926da50d68425dca975b2162a604b48a Mon Sep 17 00:00:00 2001 From: Ali Ghasemi Date: Fri, 11 Aug 2023 21:12:09 -0700 Subject: [PATCH 2/2] done! --- 02_06/ch2_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02_06/ch2_challenge.py b/02_06/ch2_challenge.py index 985db61..f758430 100644 --- a/02_06/ch2_challenge.py +++ b/02_06/ch2_challenge.py @@ -5,7 +5,7 @@ import turtle MAX_LENGTH = 250 -INCREMENT = 10 +INCREMENT = 11 def draw_spiral(a_turtle, line_length):