Question: Write a class called Height. A Height represents a height in feet and inches. It should have a constructor, __str__ and __repr__ methods, and an
Write a class called Height. A Height represents a height in feet and inches. It should have a constructor, __str__ and __repr__ methods, and an add method. The __str__ method should be written to follow this example:
>>>h = Height(15,6) >>>print(h) 15' 6"
The add should add 2 heights, and be written so that it is nondestrutive.
python 2.7.13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
