Saved Bookmarks
| 1. |
Find and write the output of the following Python code:class Client:def init (self, ID = 1, NM=”Noname”) #constructorself.CID = IDself. Name = NMdef Allocate (self, changelD, Title) :self.CID = self.CID + Changeldself.Name = Title + self. Namedef Display (self) :print (self. CID). "#”, self. Name)C1 = Client ()C2 = Client (102)C3 = Client (205, ‘’Fedrick”)C1 . Display ()C2 . Display ()C3 . Display ()C2 . Allocate (4, "Ms.”)C3 .Allocate (2, "Mr.”)C1. Allocate (1, "Mrs.”)C1. Display ()C2 . Display ()C3 . Display () |
|
Answer» CID Name — Fedrick 102 Mr. Fedrick 205 Mrs. Fedrick — Mr. & Mrs. Fedrick |
|