Python Python Basics Functions and Looping Create a Function

I do not now why this isnt working

Like the def didnt turn purple i really dont know how to do this

squaring.py
def square(number):
    return square

3 Answers

Brendan Whiting
MOD
Brendan Whiting
Front End Web Development Treehouse Moderator 82,627 Points

square is the name of the function. number is the parameter. Right now you're returning the function from the function. They want you to return the number times the number.

Damien K. Sedgwick
Damien K. Sedgwick
19,766 Points
def square(number):
    x = number * number
    return square
Duc Bui
Duc Bui
14,544 Points
def square(number):
    return number*number