I am new to Python and am attempting to write a basic program on my text editor (TextWrangler). I keep getting an EOF error
no matter what I do. Here is my code:
print('Hello world!')
print('What is your name?')
myName = input()
print('It is good to meet you, ' + myName)
print('The length of your name is:')
print(len(myName))
print('What is your age?') # ask for their age
myAge = input()
print('You will be ' + str(int(myAge) + 1) + ' in a year.')
The error I get is for line 3:
"EOF error: error when reading a line".
I have tried both raw_input
and input()
, nothing works. What am I doing wrong?
Really appreciate any help on this.
input
. Please post the actual code the actual error message, with full traceback.