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 trialSon Nguyen
638 PointsHello, can someone please tell me what I am doing wrong? Thank you for your help.
def square (number):
return (number * number)
number = int(5)
result = square(number*number)
print (result)
1 Answer
KRIS NIKOLAISEN
54,972 PointsYou built the function in task 1 ok. In task 2 you are to pass in an argument of 3 and store the result in a variable named result
. In your code above you are passing in a value of 5*5 = 25. The simplest code to complete task 2 is:
result = square(3)
Son Nguyen
638 PointsSon Nguyen
638 PointsHello Kris. Thank you so much for taking the time out to answer my question so quickly.