R 11:47 hackerearth.com/challe 3 Suppose you are given a file containing the entry number and grades of students in class. As an example, consider the following file: 5 2016ucs0003 D 2016ucs0001 B 2016ucs0002 A- 2016ucs0005 B 2016ucs0007 B 2016ucs0008 A Write a program to read the grades from the file (assume file name is grades.txt) Print the no. of students for each grade sorted by the number of students. For example, for the file given above, the output would be: В З А 1 A- 1 D 1 В- 0 со ? C- 0 F 0 LIVE EVENTS R 11:48 hackerearth.com/challe 3 y the TTuMiber UT StudeTTts. TorExampie, the file given above, the output would be: В З 5 А 1 A- 1 D 1 В- О со C- 0 Е О FO Notice that "B 3" is printed first because it has the maximum no. of students(3). Similarly, "D 1" is printed before "B- 0" If two grades have the same no. of students, you can print them in any order. In the example above, the higher grade is printed first, but doing that is optional. The domain of the grade values is all the grades supported by the IT Jammu system: A, А-, В, В-, С, С-, D, E, F. ? LIVE EVENTS
R 11:47 hackerearth.com/challe 3 Suppose you are given a file containing the entry number and grades of students in class. As an example, consider the following file: 5 2016ucs0003 D 2016ucs0001 B 2016ucs0002 A- 2016ucs0005 B 2016ucs0007 B 2016ucs0008 A Write a program to read the grades from the file (assume file name is grades.txt) Print the no. of students for each grade sorted by the number of students. For example, for the file given above, the output would be: В З А 1 A- 1 D 1 В- 0 со ? C- 0 F 0 LIVE EVENTS R 11:48 hackerearth.com/challe 3 y the TTuMiber UT StudeTTts. TorExampie, the file given above, the output would be: В З 5 А 1 A- 1 D 1 В- О со C- 0 Е О FO Notice that "B 3" is printed first because it has the maximum no. of students(3). Similarly, "D 1" is printed before "B- 0" If two grades have the same no. of students, you can print them in any order. In the example above, the higher grade is printed first, but doing that is optional. The domain of the grade values is all the grades supported by the IT Jammu system: A, А-, В, В-, С, С-, D, E, F. ? LIVE EVENTS
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
Related questions
Question
Please solve asap using python
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education