Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis In Microsoft Excel

Authors: Alex Holloway

1st Edition

B0CCCPKTTX, 979-8852388452

More Books

Students also viewed these Databases questions

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago