Python program that: 1- Asks the user for an input file name. 2-…
Question Answered step-by-step Python program that: 1- Asks the user for an input file name. 2-… Python program that:1- Asks the user for an input file name. 2- Validates that the user entered a valid file name (name of an existing file). 3- If the user enters invalid file names 3 times, displays an error message and quits. 4- Reads from the input file the names of students (don’t make assumptions about how many students) and their grades (0..5 grades per student, default to 0). The names of the students and the grades will be stored in a dictionary where the names are the keys, and the grades are stored in a list associated with the key.5- After reading the student information into the dictionary, displays the name of each student followed by their grades followed by the grade average to the console as follows:Student 1 Grade 1 Grade 2 Grade 3 Grade4 Grade 5 AverageStudent 2 Grade 1 Grade 2 Grade 3 Grade4 Grade 5 AverageStudent 3 Grade 1 Grade 2 Grade 3 Grade4 Grade 5 Average Student 4 Grade 1 Grade 2 Grade 3 Grade4 Grade 5 AverageDictionary + List:{Student1:[Grade1, Grade2, Grade3, Grade4, Grade5], Student2:[Grade1, Grade2, Grade3, Grade4, Grade5], Student3:[Grade1, Grade2, Grade3, Grade4, Grade5]} Computer Science Engineering & Technology Python Programming CSE 146 Share QuestionEmailCopy link Comments (0)


