Project #14298 - Python - loop

Question: Grade Statistics

 

 

In this question you will create functions to compute simple statistics on numeric lists. Supppose that you have to compute some statistics on the marks data.Each student has his or her given name listed in mark sheet followed by their marks in the final exam. You need to implement a program that computes the following statistics out of the mark sheet.

 

  1. The average score
  2. The highest score followed by the name of person who achieved it
 

If there are more than one person with the highest score, you need to return the first such person on the list.

 

Input 

 

First an integer N will be given, which indicates the number of test cases. For each test case, a number (n > 0) is given which indicates the number of students, then followed by 2*n lines, where each case contains the name(no space in a name) of one student in the first line, followed by his/her score in the next line. Here is an example

 

2
3
David
98
Mark
96
Alice
96
3
Jack
95
Bill
93
Bob
93 

 

Output

 

For the output part, you should output the "Case" followed by the case number and then output the average score, the highest score followed by the name of the person who achives it separately in two lines.  Answers for output must be rounded to exactly two digits after the decimal point. The example is as follows.

 

Case 1
96.67
98.00 David
Case 2
93.67
95.00 Jack

 

*don't use def function*

Subject Computer
Due By (Pacific Time) 10/10/2013 06:00 pm
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy