Answer:
see explaination
Step-by-step explanation:
Code:
count = 0 num_of_sub = int(input("Enter a number of subjects : ")) marks_of_subjects = [] for i in range(num_of_sub): count = count + 1 while True: marks = int(input("Enter the marks for subject {} : ".format(count))) if marks < 0 or marks > 100: print("Marks are out of range: Try again") else: marks_of_subjects.append(marks) break Total = sum(marks_of_subjects) Min_marks = min(marks_of_subjects) Max_marks = max(marks_of_subjects) Average_marks = sum(marks_of_subjects)/len(marks_of_subjects) print("Total Marks in the exams are {} Marks".format(Total)) print("Minimum Score in the exam is {} Marks".format(Min_marks)) print("Maximum Score in the exam is {} Marks".format(Max_marks)) print("Average Score in the exam is {:.2f} Marks".format(Average_marks))
see attachment for the screenshot and output