Implement the design of the Student and Lawyer class derived from Person class so that the following code generates the output below: class Person: def _init_(self, name, contact): self.name = name self.contact = contact def _str_(self): s= "Name: {self.name}\nContact: (self.contact}" return s #Write your code here john_cena = Student("John Cena", "9752325", 100005, "CSE") john_cena.add_courses("CSE111 Programming Language Il", "CSE230 Discrete Mathematics", "EEE101 Electrical Circuits 1") print("1.===== ===") print(john_cena) print("2.== =") john_cena.show_course_list("CSE") print("3. john_cena.show_course_list("ECE") print("4.=== ==") john_cena.add_courses("ARC101 Design I: Basic Design") print("5.= ===") print(john_cena) print("6.= =") saul_goodman = Lawyer("Saul Goodman", "5885858", "Dhaka") %3D saul_goodman.add_client("Jesse Pinkman Criminal", "Walter White Criminal", "John Cena Civil", "Naruto Uzumaki Civil") print("7.=: ===") print(saul_goodman)
please help me asap
use python
help me asap
Implement the design of the Student and Lawyer class derived from Person
class so that the following code generates the output below:
class Person:
def __init__(self, name, contact):
self.name = name
self.contact = contact
def __str__(self):
s = f"Name: {self.name}\nContact: {self.contact}"
return s
#Write your code here
john_cena = Student("John Cena", "9752325", 100005, "CSE")
john_cena.add_courses("CSE111
Mathematics", "EEE101 Electrical Circuits 1")
print("1.=========================================================")
print(john_cena)
print("2.=========================================================")
john_cena.show_course_list("CSE")
print("3.=========================================================")
john_cena.show_course_list("ECE")
print("4.=========================================================")
john_cena.add_courses("ARC101 Design I: Basic Design")
print("5.=========================================================")
print(john_cena)
print("6.=========================================================")
saul_goodman = Lawyer("Saul Goodman", "5885858", "Dhaka")
saul_goodman.add_client("Jesse Pinkman Criminal", "Walter White
Criminal", "John Cena Civil", "Naruto Uzumaki Civil")
print("7.=========================================================")
print(saul_goodman)
OUTPUT:
1.=========================================================
Student Details:
Name: John Cena
Contact: 9752325
ID: 100005
Department: CSE
Courses List:
{'CSE': ['CSE111 Programming Language II', 'CSE230 Discrete
Mathematics'], 'EEE': ['EEE101 Electrical Circuits 1']}
2.=========================================================
Courses from CSE department:
CSE111 Programming Language II
CSE230 Discrete Mathematics
3.=========================================================
John Cena did not take any course from ECE department
4.=========================================================
5.=========================================================
Student Details:
Name: John Cena
Contact: 9752325
ID: 100005
Department: CSE
Courses List:
{'CSE': ['CSE111 Programming Language II', 'CSE230 Discrete
Mathematics'], 'EEE': ['EEE101 Electrical Circuits 1'], 'ARC': ['ARC101
Design I: Basic Design']}
6.=========================================================
7.=========================================================
Lawyer Details:
Name: Saul Goodman
Contact: 5885858
Area: Dhaka
Client List: {'Criminal': ['Jesse Pinkman Criminal', 'Walter White
Criminal'], 'Civil': ['John Cena Civil', 'Naruto Uzumaki Civil']}
![Implement the design of the Student and Lawyer class derived from Person
class so that the following code generates the output below:
class Person:
def _init_(self, name, contact):
self.name = name
self.contact = contact
def _str_(self):
s= "Name: {self.name}\nContact: (self.contact}"
return s
#Write your code here
john_cena = Student("John Cena", "9752325", 100005, "CSE")
john_cena.add_courses("CSE111 Programming Language Il", "CSE230 Discrete
Mathematics", "EEE101 Electrical Circuits 1")
print("1.=====
===")
print(john_cena)
print("2.==
john_cena.show_course_list("CSE")
=")
print("3.
john_cena.show_course_list("ECE")
print("4.===
==")
john_cena.add_courses("ARC101 Design I: Basic Design")
print("5.=
===")
print(john_cena)
print("6.=
=")
saul_goodman = Lawyer("Saul Goodman", "5885858", "Dhaka")
%3D
saul_goodman.add_client("Jesse Pinkman Criminal", "Walter White
Criminal", "John Cena Civil", "Naruto Uzumaki Civil")
print("7.====:
===")
print(saul_goodman)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8208a85f-3b3c-453e-8fea-3541e20e4da1%2F4126fd71-dc6c-416c-92eb-39e5d6553983%2Fr7nrxcs_processed.jpeg&w=3840&q=75)
![OUTPUT:
1.========
=D==D=D= ----
Student Details:
Name: John Cena
Contact: 9752325
ID: 100005
Department CSE
Courses List:
('CSE': ['CSE111 Programming Language Il', 'CSE230 Discrete
Mathematics], 'EEE': ['EEE101 Electrical Circuits 1'1}
2.========
Courses from CSE department:
CSE111 Programming Language II
CSE230 Discrete Mathematics
3.======================
John Cena did not take any course from ECE department
4.s====
5.=======
Student Details:
Name: John Cena
Contact: 9752325
ID: 100005
Department CSE
Courses List:
('CSE: ['CSE111 Programming Language Il", 'CSE230 Discrete
Mathematics'), 'EEE': ['EEE101 Electrical Circuits 1]. 'ARC': ['ARC101
Design I: Basic Design']}
6.===========
7.=========
Lawyer Details:
Name: Saul Goodman
Contact: 5885858
Area: Dhaka
Client List: {Criminal': ["Jesse Pinkman Criminal', "Walter White
Criminal'), 'Civil': ['John Cena Civil, 'Naruto Uzumaki Civil']}](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8208a85f-3b3c-453e-8fea-3541e20e4da1%2F4126fd71-dc6c-416c-92eb-39e5d6553983%2Fgpt2ayq_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)