Question: I'm still new to python coding. I need a code for this question. It'd be great if I could get comments/descriptions to the major steps
I'm still new to python coding. I need a code for this question. It'd be great if I could get comments/descriptions to the major steps so I understand. Sorry if the picture is a bit unclear and blurry.


Code the program below. The program must contain and use a main function that is called inside of: If name main": OverloadingOperators Create a program that contains one class called Person. The Person class should contain an__init method that sets the variables for the first name, last name, age, and height (in cm Overload the following operators to do as instructed: Return a new instance of Person where The first name is the first object's name "Jr." The last name is the first and second object's last name with a hyphen in between The age is 0 The height is the first and second object's height added together mod 10 plus 30 Person("John", "Doe", 30, 180) Person("Jane", "Smith", 30, 160) Person("John Jr.", "Doe-Smith", 0, 30) If possible, remove the hyphenated last name from the object IE: Person("John Jr.", "Doe-Smith", 0, 30) Person("John", "Doe", 30, 180) Person("John Jr.", "Smith", 0, 30) If not possible, change nothing and print out "Not Possible" (Ensure that None isn't returned and breaks your program) Allow a tuple containing two pieces of data (age and height) to be passed to and added to the object's current age and height. If a single number is passed instead of a tuple, add it only to the age IE: Object.age - 10 Object10 Object.age20 Object.age 10 Object.height 100 Object+(10, 20) Object.age20 Object.height 120 If all variables in the object are the same, return True, else return False IE ObjectObject True If any of the variables are different, return True, else return False IE Object != OtherObject True If the age of the first object is larger that the age of the second object, return True, else return False If the age of the first object is larger or equal to the age of the second object, return True else return False If the age of the first object is smaller than the age of the second object, return True, else return False If the age of the first object is smaller or equal to the age of the second object, return True, else return False Return the first and last names of the object formatted like so: "John Doe" Create two objects of type Person with the following attributes: First Name: Bob Last Name: Robert Age: 40 Height: 167 First Name: Alice Last Name: Wonder Age: 38 Height: 170 Use the +first to create a third object of Person. Use all overloaded operators with these three objects (You do not need to use every single operator from every single object. So long as all operators in general are called you will be fine)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
