Reminder: for each class session and associated homework:
Read Sections 9.3 of Zelle.
Read it very carefully to understand the top-down design process. Come to class prepared with questions on anything you do not understand. For Session 15, we will assume that you have read and understood whatever you do not ask about; we will spend most of the class time developing another (and more complex) example to reinforce and extend what you learned by reading.
(15 pts) Complete the individual exercise you started in class, listMax.py in the 13-LoopPatterns project.
Your function listAndMax() should:
You should also define main() so that it:
listAndMax()(20 pts) Solve Zelle chapter 8, programming problem #9. This is on page 263 of your text.
Write your solution in the module fuelEfficiency.py in the 13-LoopPatterns project.
A point of clarification: For each leg of the trip, you should enter the current odometer reading and the amount of gas used for that leg. That is, the odometer reading is total for the car ever, but the amount of gas used is per leg.
Test your code and make sure that it works
Be sure to commit your code to SVN when you’re finished, or more frequently.