Consider the following data:
3.85,4.89,2.89,1.02.3.8.3.7,2.9,2.5,3.3,3.59
Which represents the GPA of the following students respectively
"Sia". "Rihanna", "Taline". "Donald", "Sabra","Stefanie","Tome","Jim","Kalim","Wu"
Write a python program that does the following
- Save the values in Tuple called studentGrade.
- Compare the GPA and find the maximum grade.
- Print the student's name who has the maximum grade.
- Find out the average GPA.
- Find out the Standard Deviation of the grades
- Calculate the median of the GPA
- Which student failed the exam (must score more than 4.1)
Here's my current code
gpa=[3.85,4.89,2.89,1.02,3.8,3.7,2.9,2.5,3.3,3.5]
sortedgrade= sorted(gpa)
print(gpa)
names=['sia','Rihanna','taline','Donald','sarah','stefanie','tome','jim','kalim','wu']
studentgrade=(gpa,names)
max=gpa[0]
for i in range (0,len(gpa)):
if gpa[i]<max:
max=gpa[i]
b=i
a=max
print(f'max grade =',a)
print(f'{names[b]} scored maximum grade')