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 trialKurobe Kuro^T_T^
5,369 PointsIn the body of the function, return the square of the value that was passed in. (A **square* is the value multiplied b
can some some explain what it mean without giving the answare
def square(number):
return number * 4
4 Answers
ursaminor
11,271 PointsYou're multiplying the number by 4 instead of squaring it. The question explains what it means to square something.
Oskar Lundberg
9,534 PointsI will just leave a solution here for you, in case you still need help. Step 1/2
def square(number):
return number*number
Step 2/2
def square(number):
return number*number
result = square(3)
ursaminor
11,271 PointsDid you read the question? What part don't you get?
Kurobe Kuro^T_T^
5,369 Pointswhat to do
ursaminor
11,271 PointsIt says "return the square of the value that was passed in" so that's what you're supposed to do. It tells you what that means: "A *square is the value multiplied by itself." In the body of the function you need to return the square of number
.
Kurobe Kuro^T_T^
5,369 PointsKurobe Kuro^T_T^
5,369 Pointsi dont get it