can someone please help me with this project it used by in python 3 and i am ver
ID: 3706905 • Letter: C
Question
can someone please help me with this project it used by in python 3 and i am very frustrated right now i keep on trying to solve this project but i cant figure it out can someone please help me i already post this question before but it wasnt correct. hi i need help with this program in python 3 can someone please help me thank you.
hi i need help with this program in python 3 can someone please help me thank you.
Write a program that uses the keys(), values(), and/or items() dict methods to find statistics about the student_grades dictionary. Find the following:
Print the name and grade percentage of the student with the highest total of points
Find the average score of each assignment.
Find and apply a curve to each student's total score, such that the best student has 100% of the total points.
# student_grades contains scores (out of 100) for 5 assignments
student_grades = {
'Andrew': [56, 79, 90, 22, 50],
'Colin': [88, 62, 68, 75, 78],
'Alan': [95, 88, 92, 85, 85],
'Mary': [76, 88, 85, 82, 90],
'Tricia': [99, 92, 95, 89, 99]
}
Explanation / Answer
Please find the code:
import matplotlib.pyplot as plt
student_grades = {
'Andrew': [56, 79, 90, 22, 50],
'Colin': [88, 62, 68, 75, 78],
'Alan': [95, 88, 92, 85, 85],
'Mary': [76, 88, 85, 82, 90],
'Tricia': [99, 92, 95, 89, 99]
}
i=0
avg=[0,0,0,0,0]
tot=[0,0,0,0,0]
total=0
j=0
for key in student_grades:
for i in range(0,5):
total = total + student_grades[key][i]
tot[j]=total
avg[j]=total/5
total=0
j=j+1
j=0
for key in student_grades:
print(key + " has average marks of: " + str(avg[j]))
j=j+1
x_coordinate = [0,0,0,0,0]
j=0
for value in tot:
tot_x[j]=value
j=j+1
y_coordinate = [30,60,90,120]
plt.plot(x_coordinate,y_coordinate)
plt.show()
__________________________________________________________________________________
it will find the average of marks and print on screen. It will also generate the curve regarding total marks
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.