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
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
194,902 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
194,902 Points

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