Python 3.5 URGENT HELP NEEDED Main.py https://pastebin.com/GGMQUsix Student.py h
ID: 3813469 • Letter: P
Question
Python 3.5
URGENT HELP NEEDED
Main.py
https://pastebin.com/GGMQUsix
Student.py
https://pastebin.com/DtQKeuzk
classlist.txt:
https://pastebin.com/aHJ7yHma
exam.txt:
https://pastebin.com/ZjKPsyv7
exam2.txt:
https://pastebin.com/QkDgAK2g
solution.txt:
https://pastebin.com/wHTfWYzV
All changes must be made to Main.py
You are required to complete the display_result(claslist) function which takes a class list and prints the marking result for all students in the class list. If the forth option of the menu, i.e., ‘Display the Marking Result’, is selected, the program should display the marking result.
Here's a sample running of this section using the “exam.txt” data file:
...
---------------------------------------------------
Enter your choice: 4
---------------------------------------------------
N00000001: John, john@amail.com, marks: [4]
N00000002: Kelly, kelly@bmail.com, marks: [5]
N00000003: Nicky, nicky@cmail.com, marks: [4]
N00000004: Sam, sam@dmail.com, marks: [6]
N00000005: Adam, adam@amail.com, marks: [4]
Here's a sample running of this section after TWO exams have been marked:
...
---------------------------------------------------
Enter your choice: 4
---------------------------------------------------
N00000001: John, john@amail.com, marks: [4, 5]
N00000002: Kelly, kelly@bmail.com, marks: [5, 7]
N00000003: Nicky, nicky@cmail.com, marks: [4]
N00000004: Sam, sam@dmail.com, marks: [6, 2]
N00000005: Adam, adam@amail.com, marks: [4, 5]
You are required to complete the display_summary(marks) function which takes a list of marks and prints the marking summary of the exam. If the fifth option of the menu, i.e., ‘Display the Marking Summary’, is selected, the program should display the marking summary of the exam. The function should compute the following statistics after you've done the marking of the exam:
* the total number of students represented in the data file
* the highest score
* the lowest score
* the average score (mean)
Here's a sample running of this section using the “exam.txt” data file:
...
---------------------------------------------------
Enter your choice: 5
---------------------------------------------------
Grade Summary:
Total number of Students: 5
Highest Score: 6
Lowest Score: 4
Mean: 4.6
Here's a sample running of this section using the “exam2.txt” data file:
...
---------------------------------------------------
Enter your choice: 5
---------------------------------------------------
Grade Summary:
Total number of Students: 4
Highest Score: 7
Lowest Score: 2
Mean: 4.75
Explanation / Answer
grade=[]
names=[]
highest=0
#taking number of calues
cases=int(input('Enter number of cases: '))
for case in range(1,cases+1):
print('case',case)
#taking number of students
number=int(input('Enter number of students: '))
for numbers in range (1,number+1):
#getting name and marks
name=str(input('Enter name of student: '))
names.append(name)
mark=float(input('Enter mark of student:'))
grade.append(mark)
print('Case',case,'result')
#printing the results!
average=float(sum(grade)/number)
print('Average is: %.2f '%(average))
print('Highest Score is: %.2f'%(max(grade)))
print('Student with highest score: ',names[grade.index(max(grade))])
sample output:
output->Enter number of cases: 2
case 1
Enter number of students: 2
Enter name of student: josh
Enter mark of student:98
Enter name of student: sarah
Enter mark of student:87
Case 1 result
Average is: 92.50
Highest Score is: 98.00
Student with highest score: josh
case 2
Enter number of students: 3
Enter name of student: shania
Enter mark of student:78
Enter name of student: arleen
Enter mark of student:89
Enter name of student: zoya
Enter mark of student:89
Case 2 result
Average is: 147.00
Highest Score is: 98.00
Student with highest score: josh
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.