Python - Constructors and Object Initialization
You want to create a class Product that stores name and price. Which constructor correctly initializes these attributes and allows creating an object with Product('Pen', 1.5)?
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions