Write a program that stores current grades in a dictionary, with course codes as keys and percent grades as values. Start with an empty dictionary and then use a while loop to enable input of course codes and percent grades from the keyboard. Enter data for at least five courses. After entering the data, use a for loop and the keys to show the current status of all courses. This same loop should include code that enables determination of the worst course and the average of all courses. Both of these findings should be printed when the loop ends. The worst course should be dropped and reported. This being done, the program should use another loop and the items method to display the revised courses and grades and report the revised term average.

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter10: Selected Single-row Functions
Section: Chapter Questions
Problem 3HOA
icon
Related questions
Topic Video
Question

program9_1.py
Write a program that stores current grades in a dictionary, with course codes as keys and percent grades as values. Start with an empty dictionary and then use a while loop to enable input of course codes and percent grades from the keyboard. Enter data for at least five courses. After entering the data, use a for loop and the keys to show the current status of all courses. This same loop should include code that enables determination of the worst course and the average of all courses. Both of these findings should be printed when the loop ends. The worst course should be dropped and reported. This being done, the program should use another loop and the items method to display the revised courses and grades and report the revised term average.
Example Output

items method to display the revised courses and grades and report the revised term av
Example Output
Input course code or Enter to quit COP1000
Grade in COP1000 as i 92
Input course code or Enter to quit MAT1000
Grade in MAT1000 as i 80
Input course code or Enter to quit PHY1000
Grade in PHY1000 as : 64
Input course code or Enter to quit ETH1000
Grade in ETH1000 as 85
Input course code or Enter to quit COM1000
Grade in COM1000 as 78
Input course code or Enter to quit
Grade in COP1000 is 92%
Grade in MAT1000 is 808
Grade in PHY1000 is 64
Grade in ETH1000 is 85%
Grade in COM1000 is 788
Current term average is 79.8%
Worst course is PHY1000 : 64%
Dropped PHY1000
Here are my revised grades...
Grade in 92 is 928
Grade in 80 is 80%
Grade in 85 is 85%
Grade in 78 is 788
Revised term average is 83.88
Recheck the requirements and then submit.
Transcribed Image Text:items method to display the revised courses and grades and report the revised term av Example Output Input course code or Enter to quit COP1000 Grade in COP1000 as i 92 Input course code or Enter to quit MAT1000 Grade in MAT1000 as i 80 Input course code or Enter to quit PHY1000 Grade in PHY1000 as : 64 Input course code or Enter to quit ETH1000 Grade in ETH1000 as 85 Input course code or Enter to quit COM1000 Grade in COM1000 as 78 Input course code or Enter to quit Grade in COP1000 is 92% Grade in MAT1000 is 808 Grade in PHY1000 is 64 Grade in ETH1000 is 85% Grade in COM1000 is 788 Current term average is 79.8% Worst course is PHY1000 : 64% Dropped PHY1000 Here are my revised grades... Grade in 92 is 928 Grade in 80 is 80% Grade in 85 is 85% Grade in 78 is 788 Revised term average is 83.88 Recheck the requirements and then submit.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Instruction Format
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
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage