From 8f03d346949bf55a4604eb5071b86194302ad04e Mon Sep 17 00:00:00 2001 From: Heather Date: Tue, 30 Sep 2025 20:47:04 -0400 Subject: [PATCH] For triangle I changed Pass to agruments for the side and length Rectangle I changed Pass to arguments for width and height Checkpoint 1 - value is what it is while name refers to something else . In everyday life I go by different names; Heather, mom, teacher, friend but the different names do not change who I am as a person. Variables are useful in programming because they simplify the programming process. Checkpoint 2 Function is like a variable in that it gives a name to something. This again simplifies the programming process. Functions can be useful in breaking down big, hard problems because once you define the function, you can now focus on what you are trying to do with the defined funtions. For example, If I define a triangle, I can use that function to put triangles together to draw a pine tree. --- greetings.py | 5 ++++- poetry.lock | 7 +++++++ shapes.py | 20 ++++++++++++++++++-- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 poetry.lock diff --git a/greetings.py b/greetings.py index 2d878a6..7e410fb 100644 --- a/greetings.py +++ b/greetings.py @@ -2,6 +2,9 @@ # ------------ # By MWC contributors -my_name ="Chris" +my_name ="Heather" greeting = "Hello, " + my_name print(greeting) + + + diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..7e72dc6 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand. +package = [] + +[metadata] +lock-version = "2.1" +python-versions = ">=3.10,<4.0" +content-hash = "7b8fc01b274bd807fb00372bbc8e138330f15ae7978ed61e180f3b17ec076725" diff --git a/shapes.py b/shapes.py index 731ec39..9044f34 100644 --- a/shapes.py +++ b/shapes.py @@ -5,7 +5,23 @@ from turtle import * def triangle(side_length): - pass + forward(side_length) + right(120) + forward(side_length) + right(120) + forward(side_length) + + + + def rectangle(height, width): - pass + forward(height) + right(100) + forward(width) + right(80) + forward(height) + right(100) + forward(width) + right(80) +