Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is in PYTHON! Write a program that keeps a dictionary in which both keys and values are strings - names of students and their

This is in PYTHON!

Write a program that keeps a dictionary in which both keys and values are strings - names of students and their course grades. Prompt the user of the program to add or remove students, to modify grades, or to print all grades.

 (A)dd, (R)emove, (M)odify, (P)rint all, or (Q)uit? 

When Add is selected prompt

 Enter the name of the student: 
 Enter the student's grade: 

When Remove is selected prompt

 What student do you want to remove? 

If the student doesn't exist display

 Sorry, that student doesn't exist and couldn't be removed. 

When Modify is selected prompt

 Enter the name of the student to modify: 

then display

 The old grade is XX 

where XX is grade to be modified, and prompt

 Enter the new grade: 

If the student name doesn't exist display

 Sorry, that student doesn't exist and couldn't be modified. 

When Print is selected the output should sorted by name and formatted like this:

 Carl: B+ Joe: C Sarah: A Francine: A 

Finally, when Quit is selected display

 Goodbye! 

Add error checking to the menu, whereas an illegal choice results in the following message

 Sorry, that wasn't a valid choice.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions

Question

Writing a Strong Introduction

Answered: 1 week ago