Using the function from part 1 as a start write a

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: with weight limit b, then the one with weight limit c. Your truck will crash if you overload any of the three weight limits. Write a function, max_trans, that returns the maximum weight that can be transported along this road. Your function should take the values of a, b, and c as input. (That is, a, b, and c will be function parameters.) Part 2 (5 pts.): There is also a second route consisting of two bridges, the first with weight limit d, and the second with weight limit e, as illustrated: Your truck can take either route. Using the function from part 1 as a start, write a function that returns the maximum weight that can be transported between the two cities. Your function should take the values of a, b, c, d, and e as input. Note that you will need to edit your function to have two additional parameters.) Test max_trans2 as follows: >>...
View Full Document

This note was uploaded on 02/12/2014 for the course CIS 122 taught by Professor Staff during the Spring '08 term at University of Oregon.

Ask a homework question - tutors are online