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

little lost.

squaring.py
def square(number):
    return number
amount = square(5*5)
print("square {}".format(amount))

1 Answer

Hi Joshua,

A little suggestion for when you're seeking assistance in the community is to, clearly, state what you're having troubles within the title/body and not to make a new post about the same question numerous times in a spammy manner.

However, the challenge is asking for a square function which is a number multiplied by itself. Although I can see how you got the 5*5. The code you're looking for is :

def square(number):
    return number * number

So that way, when you call the function, it 'squares' whatever number passed in. Hope this helps. Don't get discouraged, the more you struggle the more you learn.

Happy Coding!!