Question: class Duration: def init (self, hours, minutes): self.hours = hours self.minutes = minates def add (self, other): If not isinstance (other, Duration): return 'oops total
class Duration: def init (self, hours, minutes): self.hours = hours self.minutes = minates def add (self, other): If not isinstance (other, Duration): return 'oops total hours - self.hours + other.hours total minutes \# self.minutes - other.minutes if total minutes x=60 : totafinouns +1 totalminutes 60 return puration (totel hours, total minutes) one way time = Duratyon (5, 48) round trip time one watime + one way time print cone way time + 38 ) print (zound trip time.houflo found thip time.minutes)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
