Question: What is wrong in my Python code? I have it completed. It won't run. Copy and paste it and please tell me where it went

What is wrong in my Python code?

I have it completed. It won't run. Copy and paste it and please tell me where it went wrong. Here is a picture of the project.

What is wrong in my Python code? I have it completed. It

MY CODE:

from math import pi;

def main():

width = float(input('Enter Course Width:'));

length = float(input('Enter Course Length:'));

sandtrap_area = calculate_sand_area;

sand_total = calculate_sand;

total_bricks = calculate_bricks;

smooth_total = calculate_smooth;

rough_total = calculate_rough;

bushes_total = number_of_bushes;

mow_total = mow_time;

display = sandtrap_area,sand_total,total_bricks,smooth_total,rough_total,bushes_total,mow_total;

#sand trap area

def calculate_sand_area:

sandtrap_diameter = width/3;

sandtrap_radius = sandtrap_diameter/2;

sandtrap_area = sandtrap_radius*pi*sandtrap_radius;

return sandtrap_area;

#amount of sand needed 100 lb ft^3:: 1 ton=2000 pounds

def calculate_sand:

sand_in_feet = width*3;

sandtrap_diameter = width/3;

sandtrap_radius = width/6;

sandtrap_area = sandtrap_radius*pi*sandtrap_radius;

sand_total = (sandtrap_area*100)/2000;

return sand_total;

#number of bricks needed *3 because of feet

def calculate_bricks:

brick_length = ((width*3)/6)*pi; #sandtrap_radius=6

total_bricks = round(brick_length*3); #3 bricks high

return total_bricks;

#total smooth green

def calculate_smooth:

hole_diameter = width/2;

hole_radius = hole_diameter/2;

hole_circumference = hole_radius*pi*2;

tee_diameter = width/2;

tee_radius = tee_diameter/2;

tee_circumference = tee_radius*pi*2;

smooth_total = hole_radius*tee_radius*2*pi;

return smooth_total;

#total rough green

def calculate_rough:

course_area = width*length;

rough_total = course_area-smooth_total-sandtrap_area;

return rough_total;

#total bushes needed

def number_of_bushes:

course_perimeter = (width*length)*2;

bushes_total = course_perimeter-2;

return bushes_total;

#total mowing time

def mow_time:

mow_total = (rough_total*0.5)+(smooth_total*1);

return mow_total;

#print outputs

def display:

print ( 'Total yards of rough sod:', rough_total )

print ( 'Total yards of smooth sod:', smooth_total )

print ( 'Tons of sand:', sand_total)

print ( 'Number of retaining wall bricks: ', total_bricks )

print ( 'Number of bushes: ', bushes_total ) #

print ( 'Total Mowing Time (mins): ', mow_total )

Smooth Green Sod Brick Retaining Wall Bushes Smooth Green Sod momodopodoo Entry Trail Width Hole Sand Trap Tee-off Area Rough Sod 00000000000000 Length Gene would like you to design and implement a small program that calculates the following information for a course hole and generates a well-formatted report. 1. Total square yards of rough sod, rounded up to nearest square yard. 2. Total square yards of smooth green sod, rounded up to nearest square yard. 3. Tons of sand needed for the sand trap (US Tons), rounded up to nearest ton. 4. Number of bricks needed for the retaining wall, rounded up to nearest brick. 5. Number of bushes needed, rounded down to nearest bush. 6. How long the given hole will take to mow each week in minutes, rounded up to nearest minute. Here is some information you may need: 1. Gene will provide the length and width of the hole in yards. Your program should ask for this information in that order (length followed by width). Your program should expect a float type number for these quantities. This should be the only inputs needed to generate the report. 2. The hole green and the tee-off green areas each are circles with a diameter of half of the course width. 3. The sand trap is a circle with a diameter of one-third of the width of the course width. 4. The sand trap is 1 foot deep 5. Sand weighs 100 lbs. per cubic foot. 6. The brick retaining wall is one brick deep and 3 bricks tall. It covers half of the circumference of the sand trap. Each brick is 12 inches long. 7. The course is surrounded on all sides by bushes. Gene wants to plant 1 bush for every yard of the course perimeter, leaving 2 spots empty for the entry and exit trails. 8. It takes 0.5 seconds to mow the grass of each square yard of rough green sod (it's a very large, fast mower!). It takes double this time for the smooth green, because the mower makes 2 passes to make it very even. The area covered by the bushes should be included in the mowing time calculation The area covered by the sand trap should be excluded from the mowing time. You can ignore the contribution of the retaining wall and entry/exit trails

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!