Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

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?