Python Python Basics Functions and Looping Create a Function

Luis Barahona
Luis Barahona
883 Points

Under the function definition, call your new function and pass it the argument 3.

Help! I'm stuck!
def square(number, result):
    return 3 * 3

1 Answer

Alex Koumparos
Alex Koumparos
Python Web Development Treehouse Moderator 33,475 Points

Hi Luis,

The instructions tell you that your function should have only a single parameter: number. Your code has two inputs: number and result.

Thus, your function signature should take number as an input.

In the body of your function you should compute the square of number and return it. Your function is hard-coded to use 3 but should square the variable number.

After the function is declared, you should call your function, passing 3 as the input and assigning the result to the variable result.

Hope that helps