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 trialGeorgios Vivilakis
Python Development Techdegree Student 3,020 Pointssquaring cant give me an answer. I'm confused!
def square(number): return (number * number) result = square(25) print(result)
def square(number):
square = 100
return (number * number)
result = square(10)
print(result)
1 Answer
Travis Alstrand
Treehouse Project ReviewerHey Georgios Vivilakis !
You're very close here! Your provided code snippet passes the first task in the Challenge, but for the second, notice it's asking to pass the argument of 3
and you're currently passing 10
.
We don't need the print()
statement either, that can sometimes throw things off in these challenges.
Also, the square
variable inside of your function isn't currently being used, so we can remove that.
I hope this helps!
def square(number):
return (number * number)
result = square(3)
Georgios Vivilakis
Python Development Techdegree Student 3,020 PointsGeorgios Vivilakis
Python Development Techdegree Student 3,020 PointsOh man, it was right around the corner haha! I definitely got overthinking this :)