Question: Problem Description and Given Info Rosie's Road Co . is a new local construction company. They are interested in bidding on new highway construction projects
Problem Description and Given Info
Rosie's Road Co is a new local construction company. They are interested in bidding on new highway construction projects around the city.
They've hired you to develop some software tools that they will use to help determine material needs and costs.
Road development is not only the asphalt you see water and power conduits must be installed at the same time, and we have to account
for things like labor costs and how long it will take to develop a particular project.
The city is very regular grid, with one way intersection at each mile of road. When asking for a quote, the city sends out the number of
linear miles of road, and how many total lanes to
Other Details
The trucks hauling asphalt have a maximum capacity of US tons
The standard road lane is feet wide.
Asphalt weighs lbs per cubic foot
Asphalt costs $ per ton
Power and water utilities are run under the road as part of all road projects
Power conduit is available only in ft lengths each length costs $
Water main pipe is available only in ft lengths each length costs $
There is one intersection for every mile of road
Stoplights cost $ per light look it up that's real!
Each intersection has two stoplights, plus one additional stoplight for each lane
Work days are hour days
All workers are paid $ per hour.
Crew members can complete an amount of work in a specified time according to the equation and table below: tableCrew Members,Miles,Lanes,Days to Complete Part truckloadsofasphalt Function
Write a function named truckloadsofasphalt that takes three arguments a float and two ints and returns a value an int
The first argument will be the length of the road project in miles, the second argument will be the number of lanes for this road, and the
third argument will be the depth of the asphalt in inches. When called, this function should compute and return the number of truckloads of
asphalt needed for this road project.
Function Header
Here is a template for you to follow for this function:
def truckloadsofasphaltmiles lanes, depthinches:and the given info on the amount of asphalt a truck can carryIt is probably a good idea to break this calculation down into several stepsand store the result of each step in a variable. Function Body
First, convert the number of miles of road to the number of feet of road and store this value in a variable named roadlength. We do this
because we will need to compute the total cubic feet of asphalt needed. There are feet in a mile.
Second, compute the total width of the road in feet, and store this value in a variable named roadwidth. We do this because we will need
to compute the total cubic feet of asphalt needed. Remember that each lane is feet wide.
Third, compute the depth of the road in feet, and store this value in a variable named roaddepth. We do this because we will need to
compute the total cubic feet of asphalt needed. There are inches in a foot.
Fourth, compute the total volume of asphalt in cubic feet the roadlength roadwidth roaddepth and store this value in a
variable named asphaltcubicfeet.
Fifth, calculate the total weight of asphalt needed in pounds. Remember that asphalt weighs pounds per cubic foot. Store this value in
a variable named asphaltpounds.
Sixth, to approximate the number of truckloads of asphalt needed, divide the asphaltpounds by the number of pounds that a truck can
carry and store this value in a variable named approximatetruckloads. Remember that a truck can carry US tons lbs
seventh, round up the approximatetruckloads to find the actual number of truckloads needed for this road project. Store this result in a
variable named totaltruckloads. You may use the math. ceil function to perform the necessary rounding operation.
Finally, return the value stored in totaltruckloads.
Examples
truckloadsofasphalt should return the value
truckloadsofasphalt should return the value
truckloadsofasphalt should return the value
truckloadsofasphalt should return the value
You may wish to write some additional code to test your function. Please be sure that you delete or comment out any test code before
you submit your solution. The only code in your solution should be the required function definition.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
