it says invalid syntax how do you define square as 10?

```
def square(10):
"""Returns the square of a number."""
squared = n**2
print "%d squared is %d." % (n, squared)
return squared
square()
```

it says invalid syntax how do you define square as 10?

```
def square(10):
"""Returns the square of a number."""
squared = n**2
print "%d squared is %d." % (n, squared)
return squared
square()
```

Here in the parentheses you should have the variable n.

But here, In the parentheses you can put any number you like.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.