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

please I need assistance. this code runs well on workspace but still get error. whats wrong ?

squaring.py
def square(number):
    sqr = (number * number)
    return sqr



inputs = int(input("enter the square number"))

sq= square(inputs)
print("The square of {} is {}".format(inputs, sq))

2 Answers

Your function is good for task 1. The code after the function though needs to be removed in that you should only do what the task asks. You receive: "Bummer: EOFError: EOF when reading a line" because the checker doesn't handle the input function.

For the second task pass 3 to your function and store the result in a variable named result.

ok. Thank you very much for the quick respond