0
Anyone could you help me in solving juice maker in python
Please
7 odpowiedzi
+ 4
Stop posting same questions too many times.
And show us your attempts of that problem .
+ 1
Pls help me bro
+ 1
GOWTAM J 20EC031 here i explained
https://code.sololearn.com/cR9DQJarzvE2/?ref=app
0
One minute bro
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)
0
GOWTAM J 20EC031 please delete these. Duplicate questions aren't allowed here.
https://www.sololearn.com/Discuss/2766572/?ref=app
https://www.sololearn.com/Discuss/2766575/?ref=app
https://www.sololearn.com/Discuss/2766576/?ref=app
https://www.sololearn.com/Discuss/2766578/?ref=app
0
Tq bro