structure. Create a menu with that gives the user three choices: Grade Book Grade Book O: Exit 1: Display a sorted list of grades 2: Add a grade to the list Create an empty list at the start of the program. Display the menu at the start of the while loop and then prompt the user for a selection. For #1, you do not have to get fancy with your display. Simply displaying the list in a print statement is good enough. Remember to sort the list before displaying it. For #2, prompt the user to enter a grade and then add it to the list. For #0, exit the while loop and display, "Good bye!". The images below show what your dialog should look like. The list starts off empty. The user then adds three grades to the list. The next time the list is displayed, the three grades are shown in ascending order. Lastly, the user exits the program. Note that user input is highlighted in green. 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Please enter a selection: 1 [] Grade Book at your pro 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Please enter a selection: 2 Please enter a grade: 88 Grade Book 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Please enter a selection: 2 Please enter a grade: 95 Grade Book 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Please enter a selection: 2 Please enter a grade: 91 Grade Book 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Top 101 Please enter a selection: 1 [88, 95, 91]

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
This problem looks at your proficiency using a while loop for a menu driven interface and your proficiency with the list data
structure.
Create a menu with that gives the user three choices:
Grade Book
O: Exit
1: Display a sorted list of grades
2: Add a grade to the list
Create an empty list at the start of the program.
Display the menu at the start of the while loop and then prompt the user for a selection.
For # 1, you do not have to get fancy with your display. Simply displaying the list in a print statement is good enough.
Remember to sort the list before displaying it.
For #2, prompt the user to enter a grade and then add it to the list.
For #0, exit the while loop and display, "Good bye!".
The images below show what your dialog should look like. The list starts off empty. The user then adds three grades to the
list. The next time the list is displayed, the three grades are shown in ascending order. Lastly, the user exits the program.
Note that user input is highlighted in green.
Grade Book
0: Exit
1: Display a sorted list of grades
2: Add a grade to the list
Please enter a selection: 1
[]
Grade Book
0: Exit
1: Display a sorted list of grades
2: Add a grade to the list
Please enter a selection: 2
Please enter a grade: 88
Grade Book
0: Exit
1: Display a sorted list of grades
2: Add a grade to the list
Please enter a selection: 2
Please enter a grade: 95
Grade Book
0: Exit
1: Display a sorted list of grades
2: Add a grade to the list
Please enter a selection: 2
Please enter a grade: 91
O Grade Book
0: Exit
1: Display a sorted list of grades.
2: Add a grade to the list
Please enter a selection: 1
[88, 95, 91]
Grade Book
0: Exit
1: Display a sorted list of grades.
2: Add a grade to the list
Please enter a selection: 0
Good Bye!
Transcribed Image Text:This problem looks at your proficiency using a while loop for a menu driven interface and your proficiency with the list data structure. Create a menu with that gives the user three choices: Grade Book O: Exit 1: Display a sorted list of grades 2: Add a grade to the list Create an empty list at the start of the program. Display the menu at the start of the while loop and then prompt the user for a selection. For # 1, you do not have to get fancy with your display. Simply displaying the list in a print statement is good enough. Remember to sort the list before displaying it. For #2, prompt the user to enter a grade and then add it to the list. For #0, exit the while loop and display, "Good bye!". The images below show what your dialog should look like. The list starts off empty. The user then adds three grades to the list. The next time the list is displayed, the three grades are shown in ascending order. Lastly, the user exits the program. Note that user input is highlighted in green. Grade Book 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Please enter a selection: 1 [] Grade Book 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Please enter a selection: 2 Please enter a grade: 88 Grade Book 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Please enter a selection: 2 Please enter a grade: 95 Grade Book 0: Exit 1: Display a sorted list of grades 2: Add a grade to the list Please enter a selection: 2 Please enter a grade: 91 O Grade Book 0: Exit 1: Display a sorted list of grades. 2: Add a grade to the list Please enter a selection: 1 [88, 95, 91] Grade Book 0: Exit 1: Display a sorted list of grades. 2: Add a grade to the list Please enter a selection: 0 Good Bye!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Graphical User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education