Question: hackerrank.com / test / 7 h 5 i 7 skamti / questions / 2 ioa If the student's age is greater than 1 5 .

hackerrank.com/test/7h5i7skamti/questions/2ioa
If the student's age is greater than 15. the grade should be "High School",
Create another class School with the following attribute:
student_ list of type list.
containing Student objects
Implement the method for the School class. This method should take a list of Student objects as an argument and initialize the student_list attribute with the provided list.
Create a method inside the School class called assign_grades. This method should call the calculate_grade method for each student in the student 2 ist and set their student_grade attribute accordingly.
Define another method in the School class called get_students by_grade. This method should take a string representing the grade le: si "Elementary", "Middle School": or "High School') as input and retum a list of student names tho belons to that grade. The search should be case insensitive.
 hackerrank.com/test/7h5i7skamti/questions/2ioa If the student's age is greater than 15. the grade

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!