Question: Write a script that keeps a dictionary in which keys are strings and grades are integers names of students and their course score. Prompt the

Write a script that keeps a dictionary in which keys are strings and grades are integersnames
of students and their course score. Prompt the user of the program to add or update students,
delete user and grade, print all records sorted, print the highest score record, or exit. The
printout of the dictionary should be sorted by names and formatted like this:
Carl: 85
Joe: 75
Sarah: 95
Francine: 91
The highest score record should be formatted like this:
The highest score is: Sarah, 95
1. Create a data file call it final.txt, the content of the file is shown below: make sure the file
has no empty line at the end.
Carl,85
Joe,75
Sarah,95
Francine,91
John,65
Terry,70
2. Create a script file and call it FinalSkill.py
The function should prompt the user to enter their choice and return the choice to the
caller.
Call the function in a loop, using while statement. Save the result of the call in a variable called
choice, then test choice if it is equal 1 or 2 or 3 or 4 or 5. Based on the value of choice update
dictionary2.
3. Testing your scripts: make your script executable. Run your script.
1. Screenshot #1 shows choice 4 to print the dictionary sorted
2. Screenshot #2 shows choice #1, add or update a record (John,61)
3. Screenshot #3 shows choice #2, delete Sarah record.
4. Screenshot #4 shows choice #1, update Joe score to 60
5. Screenshot #5 shows choice #4, print the sorted dictionary again.
6. Screenshot #6 shows choice #3, print the highest score in the format shown above.
7. Screenshot #7 shows choice #5, exit the program.
8. Screenshot #8 shows your script file
9. Screenshot #9 shows the data file.

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 Programming Questions!