return self name split()[- assumes last is last def giveraise(selfpercent)self pay int(self pay ( percent)percent must be class manager(person)"" customized person with special requirements ""def __init__(selfnamepay)person __init__(selfname'mgr'payjob name is implied def giveraise(selfpercentbonus )person giveraise(selfpercent bonusif __name__ ='__main__'bob person('bob smith'sue person('sue jones'job='dev'pay= print(bobprint(sueprint(bob lastname()sue lastname()sue giveraise print(suetom manager('tom jones' tom giveraise print(tom lastname()print(tomas this is the final revisionwe've added few comments here to document our work --docstrings for functional descriptions and for smaller notesper best-practice conventionsas well as blank lines between methods for readability-- generally good style choice when classes or methods grow largewhich resisted earlier for these small classesin part to save space and keep the code more compact when we run this code nowwe see all the attributes of our objectsnot just the ones we hardcoded in the original __repr__ and our final issue is resolvedbecause attrdis play takes class names off the self instance directlyeach object is shown with the name of its closest (lowestclass--tom displays as manager nownot personand we can finally verify that his job name has been correctly filled in by the manager constructorc:\codeperson py [personjob=nonename=bob smithpay= [personjob=devname=sue jonespay= smith jones [personjob=devname=sue jonespay= jones [managerjob=mgrname=tom jonespay= this is the more useful display we were after from larger perspectivethoughour attribute display class has become general toolwhich we can mix into any class by inheritance to leverage the display format it defines furtherall its clients will auto more realistic example