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
Chapter2: Using Data
Section: Chapter Questions
Problem 1DE: Each of the following files in the Chapter.02 folder of your downloadable student files has syntax...
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
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning