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:
Joe:
Sarah:
Francine:
The highest score record should be formatted like this:
The highest score is: Sarah,
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,
Joe,
Sarah,
Francine,
John,
Terry,
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 or or or or Based on the value of choice update
dictionary
Testing your scripts: make your script executable. Run your script.
Screenshot # shows choice to print the dictionary sorted
Screenshot # shows choice # add or update a record John
Screenshot # shows choice # delete Sarah record.
Screenshot # shows choice # update Joe score to
Screenshot # shows choice # print the sorted dictionary again.
Screenshot # shows choice # print the highest score in the format shown above.
Screenshot # shows choice # exit the program.
Screenshot # shows your script file
Screenshot # shows the data file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
