diff --git a/circle_area.py b/circle_area.py index 513d6f7..80cffef 100644 --- a/circle_area.py +++ b/circle_area.py @@ -1,6 +1,9 @@ # circle_area.py # -------------- # By MWC Contributors +import math print("This program will calculate the area of a circle.") radius = float(input("What is the circle's radius? ")) +area = math.pi * radius * radius +print(area) \ No newline at end of file diff --git a/greetings.py b/greetings.py index 2d878a6..f32240c 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) diff --git a/shapes.py b/shapes.py index 731ec39..d6eadaf 100644 --- a/shapes.py +++ b/shapes.py @@ -5,7 +5,19 @@ from turtle import * def triangle(side_length): - pass + forward(side_length) + right(120) + forward(side_length) + right(120) + forward(side_length) + right(120) def rectangle(height, width): - pass + forward(width) + right(90) + forward(height) + right(90) + forward(width) + right(90) + forward(height) + right(90)