Answer to Question #263730 in Python for toni

Question #263730

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.




1
Expert's answer
2021-11-11T00:06:54-0500
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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS