Question: 1. (General python) Write the constructor for the class C(x,y,z) that receives three parameters with default values 10 , 20 , and 30 , and

1. (General python) Write the constructor for the class C(x,y,z) that receives three parameters with default values 10 , 20 , and 30 , and creates an object with attributes x,y, and z, as shown in the expected results. 2. (Arrays) Write the function odd_array (A) that receives a 2D array A and replaces by zero all elements in A that are odd. 3. (Lists) Write the function pals(W) that receives a list of words W and returns a list containing the words in W that are palindromes. 4. (Sets) Write the function has_all vowels (W) that receives a list of words W and returns the set of words in W that have all vowels. Your function must use sets and run in O(n). Hint: set('aeiou') returns the set 'a', 'e', 'i', 'o', ' u '. You may want to use set functions. 5. (Dictionaries) Write the function first_n_words (W,n) that receives a list of words W and an integer n and returns a dictionary D where for every character c in ' a ', ,.., z ', D[c] contains the list with the first n words in W that start with c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
