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.

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
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
  • SEE MORE 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