WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

Python Spyder function error

rube3459

New member

0

0%

Status

Offline

Posts

36

Likes

0

Rep

0

Bits

190

3

Months of Service

0%
Hello,
I am writing this very simple function in Spyder:



Python: Copy to Clipboard


Def square(X):
Print(x**2)

Then I select this and run it with Debug file. But it's not working. When I debug, this shows up in the Console:
c:\users\aycil\untitled5.py(1)<module>()
----> 1 def square(X):
2 print(x**2)

And when I write Square(3), it shows this in the Console:
Square(3)
*** NameError: Name 'square' is not defined


I can't solve the problem no matter what I do.
 

249

6,622

6,642

Top