Question
(PYTHON)!!!! You have a close friend that is always asking you questions. You get the feeling this friend thinks you're the smartest person in the
(PYTHON)!!!!
You have a close friend that is always asking you questions. You get the feeling this friend thinks you're the smartest person in the world (how nice). One day you have conversation that goes like this:
Your friend: How different do you think the areas are for the three basic shapes we learned in school, when their perimeters are the same?
You: I'm not sure, but I bet I could write a program that could figure it out.
Your friend: Cool, what would that look like?
For this problem, write a program that:
- takes a positive numerical number
- uses that number as the perimeter for each of a shape
- calculates the area of the shape given that perimeter
- prints out the area for each shape (e.g. - "A circle with that perimeter would have an area of...")
- do this for each of the following shapes
- square
- circle
- equilateral triangle
- you may use 3.14 as pi if you wish
- remember that getting a specific numerical root is the same as raising that number by a power equal to the inverse of the root (e.g. - cube root is same as raising a number to 1/3)
I will be evaluating your code as provided. If you provide comments, be sure to comment them (either with # or with multiline-string qualifiers """ or '''). This means your code should be able to run and produce the required output to receive full credit. I will evaluate comments and demonstrated thought process, so lack of code is not an immediate 0, but you will definitely not get full points (this is a coding class after all).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started