Question 4 Consider the code: class Fruit: definit__(self, weight, sweetness, colour): self.weight = weight self.sweetne
Posted: Thu May 05, 2022 12:51 pm
Question 4 Consider the code: class Fruit: definit__(self, weight, sweetness, colour): self.weight = weight self.sweetness = sweetness self.colour = colour What is the purpose of line 3, self.weight = weight? Nothing Stores the value of the parameter weight as an attribute of self. It makes 'weight' the default value of the attribute weight. Submit Submit