(Solved):Write a Python class, Flower, that has three instance variables of str, int, and float, that respectively represent the name of flower, its number of petals, and its price. Your class must include… View Answer…

 

Question

Write a Python class, Flower, that has three instance variables of str, int, and float, that respectively represent the name of flower, its number of petals, and its price. Your class must include a constructor method that initializes each variable to an appropriate value, and your class should include methods for setting the value of each type, and retrieving the value of each type. Please demo how to use class

Scroll to top