Create a program that will accept number of students and number of quizzes of students. Based on this input the program will accept the name of the student and the quiz grades of the student. The input will be stored to a dictionary. The name of the student will be the key and the quizzes will be the value in list format (e.g., {“Jose S. Uy”: [87,90,97,80,95], “Rowena M. Evangelista”: [88,87,90,97,83].
The program will output the list of quizzes per student, the lowest quiz, the highest quiz, and the average quiz grade.
students = ["Alex", "John", "David", "Joseph", "Mathew"]
grades = []
for student in students:
grade = input("Enter the quiz grade for "+student+": ")
grades.append(int(grade))
print("Grades are:", grades)
average = sum(grades) / len(grades)
print("The average of quiz is:", average)
highest = max(grades)
print("The highest quiz is:", highest)
lowest=min(grades)
print("The lowest quiz is:", lowest)
Comments
Leave a comment