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

robin saldanha
seal-mask
.a{fill-rule:evenodd;}techdegree
robin saldanha
Python Development Techdegree Student 281 Points

Help please

feeling like I hit a wall.. why is this not working?

squaring.py
def square(number):
    return number*number
result = square("3")
print (result)

3 Answers

You're passing it a string "3".

A number is only a number if it doesn't have " surrounding them.

ThatOneCoder -
ThatOneCoder -
9,310 Points

You're making a string instead of a integer at the 3.

make sure you know that when having a number putting " around it won't make it a number.