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 )
2 Antworten
+ 4
This will help you:
https://code.sololearn.com/cK53Snt5Z68l/?ref=app
+ 1
Thanks 👍