You are a teaching assistant in a Geometry lab. Geometry students always seem to be asking you questions concerning the calculations for area and volume. All of the variables and equations confuse some students. You come up with an idea to use an old PC in the lab that students can use to answer their questions.
Create a series of small programs each performing a calculation. Name each program the shape, followed by “-“, followed by the type of calculations (examples, Each program should first display a message stating what the program does. This can reduce confusion if the student runs the wrong program.
For each variable in the equation ask the user to enter a value. Since these are students don’t just give them just the variable letter (like r); tell them the name of the variable also (like radius). If a variable appears many times in an equation only ask the user once for it.
Your programs need to perform the correct calculation and output the correct equation and the answer.
Here is some sample runs.
Sample 1
Assume user runs
This program will compute the area of a square.
Enter the length of one of the sides of the square (a)?
>> 3
The equation for the area of a square is (area = a^2).
Your square has an area of 9

Sample 2
Assume user runs
This program will compute the volume of a square pyramid.
Enter the area of the base of the pyramid (B)?
>> 5
Enter the height of the pyramid (h)?
>> 2
The equation for the volume of a square pyramid is (volume = 1/3 * B * h).
Your square has an area of 3.33333333

Write a small program for each of the shape and type of equations.
Shape Type
Square Area
Triangle Area
Rectangle Area
Trapezoid Area
Circle Area
Rectangular prism Volume
Right circular cylinder Volume
Square pyramid Volume
Right circular cone Volume
Sphere Volume

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

print("This program will comopute the area a square.")
w = input("Enter the length of width/height of the square (w)? ")
w = float(w)
print("The equation for the area of a square is \n area = w*w. ")
print("Your square has a area of " + str(w*w))...

By purchasing this solution you'll be able to access the following files:
Solution.docx and

50% discount

$50.00 $25.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats