Python Python Basics Functions and Looping Create a Function

Jonathan Trinh
Jonathan Trinh
1,426 Points

Create a function named square. It should define a single parameter named number. In the body of the function return

Need help with this question

squaring.py
def square(number, number):
    numbersquared - number*number
    return numbersquared

1 Answer

Tim Buck
Tim Buck
4,174 Points

The question asks for the function to only have one parameter. Yours has two:

def squared(number, number):

You will have to try again with only one "number" in the brackets.

I also noticed you put a minus symbol instead of an equals sign within the function!