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

Jared Wirth
Jared Wirth
319 Points

In my basic python course I have huge errors when I am trying to code. This seems broken.

squaring.py
def square(number):

1 Answer

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Hey Jared Wirth 👋

You're very close on this one! Reason for the challenge not passing is that you only have the first part of the task completed 🙂 You have the function defined perfectly and got the parameter setup exactly as requested but the second part of the task seems to be missing:

In the body of the function, return the square of the value that was passed in.

In order to pass the challenge you'll want to add a return statement in the body of the function.

Hope this helps to get you going again! 🙂