0

Pls I need help with code coach juice maker I want the litres to be in between brackets

class Juice: def __init__(self, name, capacity): self.name = name self.capacity = capacity def __str__(self): return (self.name + ' ('+str(self.capacity)+'L)') a = Juice('Orange', 1.5) b = Juice('Apple', 2.0) jiuce=("orange&Apple") litres=(1.5+2.0) L=("L") result=(str(jiuce)+(str(litres )+L)) print (result )

3rd Jan 2021, 4:44 PM
خديجة
خديجة - avatar
2 odpowiedzi
3rd Jan 2021, 4:46 PM
JaScript
JaScript - avatar
+ 1
Thanks 👍
3rd Jan 2021, 4:50 PM
خديجة
خديجة - avatar