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

what does EOF when reading a line mean? i can't seem to work out what is wrong

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

number = float(input("What number would you like to square?    "))

square_number = square(number)

print("You're number squared is {}".format(square_number))

Hope you don't mind me saying, but that last line should be "Your number squared is {}", not "You're number squared is {}". The first one is a possessive adjective, the second is a contraction of you are / you were.

2 Answers

Steven Parker
Steven Parker
231,248 Points

"EOF" stands for "End Of File", which means it went all the way to the end looking for something missing in the syntax. I don't see anything missing but I think it got confused by the extra code that isn't part of the instructions.

For the challenge you only need to define the function, you don't need to run it, or "input" or "print" anything.

thank you

Steven Parker
Steven Parker
231,248 Points

Don van Beusichem — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!