Question: Need help defining a class that returns only odd or even numbers Problem/Solution Requirements: Test Code: Thank you very much! Solution Specifications Your solution to
Need help defining a class that returns only odd or even numbers
Problem/Solution Requirements:

Test Code:

Thank you very much!
Solution Specifications Your solution to this problem must meet the following criteria. 1. You must define a class NumberList in the file number_list.py with one attribute for the list of integers. 2. Create two instance methods in NumberList: - get_even returns a list of only the even numbers - get_odd returns a list of only the odd numbers import number_list test_list = [1,2,3,4,5,6,7,8] my_list = number_list.NumberList(test_list) print(my_list.get_even()) print(my_list.get_odd())
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
