Python

Hello there , can anuone help me with this?
Write a Python program which takes a sequence of inputs that contain lists of grades of some students
(each student info is presented in one line) and some query items. Input data will contain the total
number of students, i.e. M_STUDENTS, total lab count, i.e. LAB_COUNT, and homework count, i.e.
HW_COUNT, that are provided at the beginning, and then followed by records of each student in the
order of student id, name, surname, lab grades, homework grades, midterm grade, and final grade.
After the student records, a set of query items, which contains a sequence of student ids, will be
provided. Write a program that calculates the cumulative averages of all the grades of the students in
the query items