I am a noob at python and just started to learn this. I am trying to follow the book automate the boring stuff with python practical programming for total beginners but receiving error on my first excersise. The book is using python 3 and I am using python 2.7.6
I have tried to change it by putting brackets or taking brackets off but unable to figure it out. Please help in regards to this.
Error:
Traceback (most recent call last):
File "first.py", line 5, in <module>
myName = input()
File "<string>", line 1, in <module>
NameError: name 'test' is not defined
Code Written:
print "Hello world"
print "What is your name?" #ask for their name
myName = input()
print "nice to meet you, " + myName
print "the length of your name is:"
print (len(myName))
print "What is your age?" # asking for age this time
myAge = input()
print "You will be " + str(int(myage) +3) + "in three years."