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 trialDon van Beusichem
Courses Plus Student 373 Pointswhat does EOF when reading a line mean? i can't seem to work out what is wrong
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))
2 Answers
Steven Parker
231,269 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.
Don van Beusichem
Courses Plus Student 373 Pointsthank you
Steven Parker
231,269 PointsDon van Beusichem — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!
Ed H-P
2,728 PointsEd H-P
2,728 PointsHope 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.