Question: questions-- test file-- my code---- error--- plz help me solve this Create a Python class my_family, which will have the following attributes: Python my_first_name ->

questions--

questions-- test file-- my code---- error--- plz help me solve this Create

a Python class my_family, which will have the following attributes: Python my_first_name

test file--

-> default set to 'John' by _init_ my_family_name -> default set to

'Wick' by __init_ my_fathers_name -> default set to "unknown' by __init_ my_mothers_name

-> default set to unknown by init my_sisters_name -> default set to

my code----

unknown by __init_ my_brothers_name -> default set to "unknown' by _init_ the

error---

class should also contain the following methods 1. __init_(self, first_name = 'John',

plz help me solve this

Create a Python class my_family, which will have the following attributes: Python my_first_name -> default set to 'John' by _init_ my_family_name -> default set to 'Wick' by __init_ my_fathers_name -> default set to "unknown' by __init_ my_mothers_name -> default set to unknown by init my_sisters_name -> default set to unknown by __init_ my_brothers_name -> default set to "unknown' by _init_ the class should also contain the following methods 1. __init_(self, first_name = 'John', second_name = 'Wick) (1 marks) This function will assign: first_name to my_first_name second name to my family_name my fathers name, my_mothers_name, my sisters name and my brothers_name will all be set to the string 'unknown 2. return_my_name(self) (1 marks the function will return a list containing two elements in the following order my first name my family name 2. 'return_my_name(self) (1 marks) - the function will return a 'list' containing two elements in the following order my_first_name, my_family_name 3. 'add_parents_names(self, mothers_first_name, fathers_first_name) (1 marks) - assign mothers_first_name to my_mothers_name - assign fathers_first_name to my_fathers_name (1 marks) 4. 'add_siblings_names(self, sisters_first_name, brothers_first_name) - assign sisters_first_name to my sisters_name - brothers_first_name to my brothers_name 5. 'return_all_first_names(self) (1 marks) - this function will return a "dictionary as follows: {"me':my_first_name, "my_mum'; my_mothers_name, "my_dad' :my_fathers_name, 'my_sister smy_sisters_name, 'my_brother':my_brothers_name] 6. 'check_if_my_sisters_name(self, name) (1 marks) - test whether name is equal to my_sisters_name - if yes return True - if not return false 3]: me_first = 'Thomas me_family= Anderson mother first = 'Michelle father first = 'John sister_first = *O-Ren! brother_first = 'Bill another_random_name = 'Winston grade = 0 this_is_my_family1 = my_family print(this_is_my_family1) if (this_is_my_family.my_first_name == 'John') and (this_is_my_family1.my_family_name == 'Wick) and (this_is_my_f. print('91 is correct") grade += 1 else: print('41 is incorrect') my_name = this_is_my_family1.return_my_name() if (isthstance(my_name, list)) and (len(my_name) == 2) and (my_name[@] == John') and (my_name[1] = 'Wick): print('92 is correct') grade += 1 else: print('92 is incorrect') this_is_my_family1.add_parents_names (mothers_first_name = mother_first, fathers_first_name = father_first) if (this_is_my_family1.my_mothers_name == mother_first) and (this_is_my_family1.my_fathers_name == father_first): print('93 is correct') grade += 1 else: print('93 is incorrect') this_is_my_family1.add_siblings_names (sisters_first_name = sister_first, brothers_first_name = brother_first) if (this_is_my_family1.my sisters_name == sister_first) and (this_is_my_family1.my_brothers_name = brother_first): print('94 is correct') grade += 1 else: print('94 is incorrect') all_nantes = this_is_my_family1.return_all_first_names() if (isinstance(all_names, dict)) and (len(all_names) == 5) and (all_names ['my_mum'] == mother_first): print('95 is correct') grade += 1 else: print('95 is incorrect') 5) and (all_names['my_mum'] == mother_first): all_names = this_is_my_family1.return_all_first names () if (isinstance(all_names, dict)) and (len(all_names) print('95 is correct') grade += 1 else: print('95 is incorrect') is_my_sister = this_is_my_family1.check_if_my_sisters_name(name = another_random_name) if (is_my_sister == True) and (another_random_name this_is_my_family1.my_sisters_name): print('96 is correct') grade += 1 elif (is_my_sister False) and (another_random_name != this_is_my_family1.my_sisters_name): print('96 is correct') grade += 1 else: print('96 is incorrect') print(Problem 1 total:', grade) in my family art Denne initely First-Sohn', second wick, my fathers er first name saya second_name thers fathers_ selfmother_others sister_my_sisters_name strothers brothers_man (altyfirstrane,calf.my folyam] this_is_tastyyty wy_ame this l_fadily.reum_y_m) I Family Object at 0022667605060) al is correct Atte LhuteError Traceback (most recent call last) clpython-input-163-1647 in codul --> 21 yame=this_is_Fanily.returny_name] 22. If sinstance_name, list)) and (lenny_jane) - 2) and (my_taneo - Sch) and me print("a2 is correct') Attributerortly object has no attribute 'return_w_name

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!