Extra Credit #3

Due: Thursday, February 22, 2018 at 11:59 p.m.
Points: 30


Please turn in your answers for the homework assignment on Canvas under Extra Credit #3 there.

  1. (20 points) Modify your program in homework 3 question 2 to print out a list of the breath numbers that have the maximum and minimum difference in the volume of air inspired and expired.
  2. (10 points) Modify the above program to handle the plurals, commas, and "and"s properly. So, for example, your output is to look like the following (again, the numbers are wrong):
    Average volume of air inspired is 120.15 ml with a standard deviation of 328.90
    Average volume of air expired is 121.82 ml with a standard deviation of 561.20
    The maximum difference between air inspired and expired is 289 for BN 1000
    The minimum difference between air inspired and expired is 5 for BNs 1234 and 5678
    

    or, if there are more than 2 breath numbers with the minimum difference, the last line would look like:

    The minimum difference between air inspired and expired is 5 for BNs 1234, 3456, 4567, and 5678
    

Matt Bishop
Department of Computer Science
University of California at Davis
Davis, CA 95616-8562 USA
Last modified: Version of February 11, 2018 at 9:17PM
Winter Quarter 2018
You can get a PDF version of this