My code runs fine in IDLE but when launched in the Python terminal it crashes after typing the age. I have tried different versions of Python and it runs in IDLE fine. The version currently using 3.13. I am a complete beginner and I only started yesterday.
Code I used:
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?')
myAge = input ()
print('You will be ' + str(int(myAge) + ((1))) + ' in a year.')
It was expected to complete showing plus 1 your age but fails at the terminal.
New contributor
Timothy Fletcher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.