0

Anyone could you help me in solving juice maker in python

Please

26th Apr 2021, 6:52 AM
GOWTAM J 20EC031
GOWTAM J 20EC031 - avatar
7 Respuestas
+ 4
Stop posting same questions too many times. And show us your attempts of that problem .
26th Apr 2021, 6:54 AM
TOLUENE
TOLUENE - avatar
+ 1
Pls help me bro
26th Apr 2021, 6:58 AM
GOWTAM J 20EC031
GOWTAM J 20EC031 - avatar
26th Apr 2021, 7:08 AM
TOLUENE
TOLUENE - avatar
0
One minute bro
26th Apr 2021, 6:56 AM
GOWTAM J 20EC031
GOWTAM J 20EC031 - avatar
0
class Juice:     def __init__(self, name, capacity):         self.name = name         self.capacity = capacity                     def __add__(self,obj):         name = self.name + "&" + obj.name         cap = self.capacity +obj.capacity         return Juice(name,cap)     def __str__(self):         return (self.name + ' ('+str( self.capacity ) + 'L)')         a = Juice('Orange', 1.5) b = Juice('Apple', 2.0) result = a + b print(result)
26th Apr 2021, 6:58 AM
GOWTAM J 20EC031
GOWTAM J 20EC031 - avatar
0
Tq bro
26th Apr 2021, 7:27 AM
GOWTAM J 20EC031
GOWTAM J 20EC031 - avatar