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
David Staggs
Python Web Development Techdegree Student 275 PointsSquared.py
Good morning. So, my code works in the workspace, it is just telling me that im wrong in the challenge. It is very basic, can you guys tell me what im doing wrong?
def square(number): number_squared = number * number return number_squared
number = float(input("What would you like squared? ")) result = square(number)
print("Your squared is {}".format(result))
2 Answers
Steven Parker
243,318 PointsYou didn't provide a link to the course page so I'm running strictly on memory.
But as I recall, the course challenge asked for a function that would work with a passed-in argument and return the result. I'm pretty sure an "input" wouldn't be part of the solution, and you would not need to "print" anything.
David Staggs
Python Web Development Techdegree Student 275 PointsAhh,that's it. I'm adding took much. Thank you.