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


*PLEASE LOOK AT SLIDES FOR EXAMPLE OF ANSWER

Screen Shot 2020-06-08 at 22.10.26.pngScreen Shot 2020-06-08 at 22.10.03.png

Screen Shot 2020-06-08 at 22.10.03.png
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 find 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 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 (see example in next slide)
Screen Shot 2020-06-08 at 22.10.26.png

Step-by-step answer

The student who asked this found it Unhelpful

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

Subscribe to view the full answer

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
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Let our 24/7 Python Programming tutors help you get unstuck! Ask your first question.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes