Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics Functions and Looping Create a Function

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

Help! I'm stuck!

squaring.py
def square(number, result):
    return 3 * 3

1 Answer

Alex Koumparos
seal-mask
.a{fill-rule:evenodd;}techdegree
Alex Koumparos
Python Development Techdegree Student 36,887 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

Alex