Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop and write the code of the python class member function memberfunc1 (write only the function as the answer) according to the descriptions given below:
Develop and write the code of the python class member function memberfunc1 (write only the function as the answer) according to the descriptions given below: 1. By using the constructor, two lists are expected to be assigned to the class member variables. The elements/items of the assigned lists may include any type of python objects. = class TypeClass(object): def __init__(self, list1 = self.local1 = list1 self.local2 = list2 [], list2 = []): [ 2. There is one class method (except constructor method). The description of the method (member functions) is given below: memberfunci: (1) If the lists are not lists of integer type objects or the length of the lists are not equal, then function returns 0 and finalizes. (2) By processing the member lists locali, local2 of integer items, creates and returns a new list, such that each item at index k of the new list is a 3- tuple including local1[k], local2[k] and the product of these numbers. For example, If local1 = [1,-1,2,1], and local2 [2,0,3,5] new list [(1, 2, 2), (-1, 0, 0), (2, 3, 6), (1, 5, 5)] = = 3 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started