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

Kenneth Usher
Kenneth Usher
661 Points

return the square of the value

I really need help on this one. Can some guide me through the process of this function

squaring.py
import math

def square(number):

Give it a try, work through it and add each task line by line. Don't be scared to get it wrong, making mistakes is the best way to improve!

I will be happy to share my answer if you can give me your best attempt.

Kenneth Usher
Kenneth Usher
661 Points

I finally got it!!!!!! Thanks for the encouragement

Nothing more satisfying than finally figuring out something youv'e been struggling with for a long time, nice work!

1 Answer

WAIT A MINUTE are you the guy in the video?