Question: Function 0 Save C Reset function finalToll = CalculateToll ( baseToll , vehicleweight ) % baseToll: The base toll to cross a bridge in dollars

Function 0
Save
C Reset
function finalToll = CalculateToll (baseToll, vehicleweight)
% baseToll: The base toll to cross a bridge in dollars
% vehicleweight: Weight of a vehicle in pounds
% TODO: Assign finalToll with baseToll
finalToll =0;
% TODO: If vehicleweight is over 5,000 pounds, increase finalToll by 4 dollars
% TODO: Assign finalToll with twice the value of finalToll
end
Code to call your function?
1 CalculateToll(10,3500)
 Function 0 Save C Reset function finalToll = CalculateToll (baseToll, vehicleweight)

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!