Build a Discount Calculator - Step 6

Tell us what’s happening:

I believe that I instantiated product correctly and it is not letting me pass.

Your code so far

class Product:
    def __init__(self, name: str, price: float) -> None:
        self.name = name
        self.price = price

    def __str__(self) -> str:
        return f'{self.name} - ${self.price}'

# User Editable Region
        product=Product("Wireless Mouse",50.0)
        print(product)
# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36

Challenge Information:

Build a Discount Calculator - Step 6

GitHub Link: https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/workshop-discount-calculator/68e529226b0defdff26c4a8a.md

Welcome to the forum @31rsouri,

Are you sure about your indentation?

I’m seeing this error in the console:

Traceback (most recent call last):
  File "main.py", line 1, in <module>
  File "main.py", line 9, in Product
NameError: name 'Product' is not defined

Happy coding

Oh, I see my error now. Thank You @dhess.