Local variable 'price' referenced before assignment


#1

I have attached the image.
I can't figure out what's wrong with my code.
Help please.


#2

Nevermind, I found the error myself.

I had used == instead of =