Counting Student Grades
Python
Easy
dicts
Task «Counting Student Grades»
Write a program that takes as input a list of students with their grades in a subject. For each student, their name and grade are specified. It is necessary to count how many times each grade occurs among all students, and output the results in ascending order of the grade. It is guaranteed that grades can range from 2 to 5 inclusive.
Input Format
In the first line, an integer N (1 ≤ N ≤ 1000) — the number of records. Then in N lines, each record: the student's name (a string of Latin letters, up to 20 characters) and a grade (an integer from 2 to 5), separated by a space.
Output Format
Output 4 lines: for each grade from 2 to 5, a line in the format 'Grade X: Y', where X is the grade and Y is the number of students with that grade. Each line is printed on a separate line.
Examples
Example 1
INPUT
3
John 2
Kate 2
Mike 2
OUTPUT
Оценка 2: 3
Оценка 3: 0
Оценка 4: 0
Оценка 5: 0
main.py