Question: Python Suppose scDict maps names to test scores. 1. Print each name/score on a separate line 2. Write a function calcStats that calculates and RETURNS

Python

Suppose scDict maps names to test scores.

1. Print each name/score on a separate line

2. Write a function calcStats that calculates and RETURNS the average, highest, and lowest of the scores. The function should NOT print anything. Ex: scDict ={Joe:70, Bob:90, Sue: 95}

Output:

Joe 70 Bob 90 Sue 95 Average: 85 High Score: 95 Low Score: 70 3. Ask the user to enter a name and a score, and put that entry into the scDict.

4. Ask the user to enter a name to delete and remove that entry

5. Check to see if the dictionary contains a key Mary and print YES if it does.

6. Print the dictionary, sorted by name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!