Question: Help with python code? #Given the following code: class DrinkO: def init(self, name, calories): self.name name self.empty_calories calories/2 self.healthy_calories calories/2 def drink(self): print(You drink +self.name+

Help with python code?
 Help with python code? #Given the following code: class DrinkO: def

#Given the following code: class DrinkO: def init(self, name, calories): self.name name self.empty_calories calories/2 self.healthy_calories calories/2 def drink(self): print("You drink "+self.name+" which provides:") print(" \t empty:"+str(self.empty_calories)) print("nt healthy: "+str(self.healthy_calories)) # Write a smoothie class that extends from Drink class # Override the-init-function to only take calories and set the name to Smoothie, it should also distribute all the calories to healthy calories (Not half/half) # Write a Soda class that extends from Drink class # 0verride the-init-function to only take calories and set the name to Soda, it should also distribute all the calories to empty calories KNot half/half) # Write a DietSoda class that extends from Soda class # Override the-init-function to not take any parameters, but set the name to DietSoda and both calories to # Write a VeganSmoothie class that extends from Smoothie class # Override the drink function so that it operates the same as before, but adds a line to the end of the print: "and higher enlightenment..." Ln: 20 Col: 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!