From 3dd5313ba4f61c48f62f8dfd57c2228ab18aebd7 Mon Sep 17 00:00:00 2001 From: jandrews Date: Thu, 25 Sep 2025 09:56:09 -0400 Subject: [PATCH] working on the triangle logic --- circle_area.py | 4 +++- greetings.py | 4 ++-- shapes.py | 10 ++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/circle_area.py b/circle_area.py index 513d6f7..e7378e3 100644 --- a/circle_area.py +++ b/circle_area.py @@ -3,4 +3,6 @@ # By MWC Contributors print("This program will calculate the area of a circle.") -radius = float(input("What is the circle's radius? ")) +radius = float(input("What is the circle's radius?")) +area = 3.14*radius*radius +print(area) diff --git a/greetings.py b/greetings.py index 2d878a6..5d0bf90 100644 --- a/greetings.py +++ b/greetings.py @@ -2,6 +2,6 @@ # ------------ # By MWC contributors -my_name ="Chris" +my_name = input("what is your name? ") greeting = "Hello, " + my_name -print(greeting) +print(greeting) diff --git a/shapes.py b/shapes.py index 731ec39..7374058 100644 --- a/shapes.py +++ b/shapes.py @@ -5,7 +5,13 @@ from turtle import * def triangle(side_length): - pass - + right(45) + forward(side_length) + right(45) + forward(side_length) + right(45) + forward(side_length) + right(45) + def rectangle(height, width): pass