From 155a8391ddfc236d6b6da5db7bacf8c32192dd68 Mon Sep 17 00:00:00 2001 From: finn Date: Mon, 5 Jun 2023 13:47:22 -0400 Subject: [PATCH] Draft 1.1 --- functions.py | 70 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/functions.py b/functions.py index b036269..49d1f2b 100644 --- a/functions.py +++ b/functions.py @@ -1,3 +1,9 @@ +#inductive vs deductive +#breaking complicated problem into simple problems +#when trying to recreate a brick wall, we can start brick by brick. + +#if students are stuck, we fill in the gaps for them. + from turtle import * #let's try making a brick... that shouldn't be too hard. It's a rectangle. @@ -194,46 +200,52 @@ def rosette(): def stem(): right(90) forward(100) - backward(100) left(90) #...and leaves... -def leaf(): - circle(50,130) - penup() - circle(50,230) - pendown() - circle(100,130) +def right_leaf(): + left(90) + forward(50) + left(30) + forward(30) + left(150) + forward(50) + left(30) + forward(30) left(60) - circle(55,110) - penup() - circle(55,250) - pendown() - left(26) - circle(55,90) - penup() - circle(55,270) - right(86) - circle(100,230) - pendown() - right(10) - circle(60,130) - penup() - circle(60,230) - left(10) - pendown() + +def left_leaf(): + right(90) + forward(50) + right(30) + forward(30) + right(150) + forward(50) + right(30) + forward(30) + right(60) #Let's put those leaves on the stem... def stem(): right(90) forward(100) - leaf() - right(90) + left_leaf() + right_leaf() forward(100) -#rosette() -#stem() -leaf() +rosette() +stem() +penup() +home() +forward(100) +pendown() +two_rows_of_bricks() +two_rows_of_bricks() +two_rows_of_bricks() +two_rows_of_bricks() +two_rows_of_bricks() +two_rows_of_bricks() + input()