Share your repls and programming experiences

← Back to all posts
Need some OOP help!
ege47 (3)

My real is an oop program. I am new to real and wrote this to get myself with the workings of real.
This is a simple oop program for a product. It takes the product name, price and discount amount. Then it prints the information for one of the two products.
The program is not working. I am getting an error saying Product takes no values.
There are two files, the object file and the main.
Thanks in advance for any help.


for the class, it should be def __init__ instead of def _init_

ege47 (3)

Didn't know if you got this or not.
You were right. Went back and looked at it again. I had single underscore instead of double. Works good no. [email protected]

PDanielY (959)

Its called a repl not a real