Solved by Expert Tutors
Question 5 (Homework Question) A professor is grading the exams of his students and wants to save their grade in a dictionary (with the key being...
Solved by Expert Tutors
Question

A professor is grading the exams of his students and wants to save their grade in a dictionary (with the key being their name and the grade for the exam as a value) Create the functions below:

● Function called "addStudent" which takes in two parameters, name and grade, and adds the student as a key and a grade as a value to the dictionary

● Function called "deleteStudent" which takes a name as a parameter and deletes that student from the dictionary

● Function called "getStatisitcs" which returns as a tuple the minimum grade, maximum grade, and average of the grades in the dictionary. Use math.fsum() function from math module to get the sum of the grades which is needed to find average. Import only this one function from the math module. Do not import all the functions

● Function called "SaveToFile" which takes one parameter as file name, and saves the student and their grades into this file. In the file, the grade is to be tabbed from the name and each student is on a new line

Question 5 (Homework Question) A professor is grading the exams of his students and wants to save their grade in a
dictionary (with the key being their name and the grade for the exam as a value) Create the functions below: 0 Function called “addStudent” which takes in two parameters, name and grade, and
adds the student as a key and a grade as a value to the dictionary 0 Function called “deleteStudent” which takes a name as a parameter and deletes that
student from the dictionary 0 Function called “getStatisitcs” which returns as a Mthe minimum grade, maximum
grade, and average of the grades in the dictionary. Use math.fsum() function from
math module to get the sum of the grades which is needed to ﬁnd average. Import only this one function from the math module. Do not import all the functions.
0 Function called “SaveToFile” which takes one parameter as ﬁle name, and saves the student and their grades into this ﬁle. In the ﬁle, the grade is to be tabbed from the
name and each student is on a new line (see example in next slide)

ng elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, conseacinia pulvi

lestie consequat, ultrices ac magna. Fusce dui lectus, congue vel lao

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents