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 trialARISA SEKI
377 PointsI'm a beginner, I can't complete the Challenge Task. I have no idea what I made mistake ;(
Bummer: AssertionError: 25 != 9 : Make sure you store the return value from the function in a variable named result
def square(number):
return number * number
result = square(5)
print(result)
2 Answers
Unsubscribed User
Front End Web Development Techdegree Student 33,900 PointsI think it wants you to store the "number * number" in the variable result (inside the function) and then return the variable.
Janko Bauer
13,358 PointsHi,
I don't know the details on the question, but it looks like you need to assign the result in the function and then return the result.
And tip: we almost never have to call the function. We just have to provide it. The calling is done in the evaluation, for us. And no printing. I did that and it never passed...
ARISA SEKI
377 PointsThank you for your advice!
Unsubscribed User
Front End Web Development Techdegree Student 33,900 PointsUnsubscribed User
Front End Web Development Techdegree Student 33,900 PointsLet me know if you don't know what I mean.
ARISA SEKI
377 PointsARISA SEKI
377 PointsThank you for helping me so promptly! I did it!