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

I'm having trouble with my code. Please help.

It says that my math might be off for the 2nd argument. Don't know what to do...Thanks in advance!

squaring.py
def square(number):
    value = number **1
    return value

1 Answer

Antonio De Rose
Antonio De Rose
20,885 Points

square is multiplying the the input, in your case, it is the number argument with number why was the number ** 1, it should be number * number

I have no idea what I'm doing as you might have gathered. I will watch the videos again... Thanks for your help!