Question: Enhance the program by allowing the user to specify the list of months they want to see. A valid query may in addition to the

Enhance the program by allowing the user to specify the list of months they want to see. A valid query may in addition to the year number contain a list of month numbers separated by spaces.
For example, 19501357 requests the data for January, March, May, and July of 1950. If the months are not specified, report full year. The average should be computed only for the reported months.
Enter query: 1950
[23.5,23.5,23.6,23.6,23.7,23.8,24.1,24.3,24.4,24.6,24.7,25.0]24.066666666666666
Enter query: 19501357
[23.5,23.6,23.7,24.1]23.725
Enter query: 195056
[23.7,23.8]23.75
Enter query:

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!