So the program works fine in PyCharm (where I created it) and prints the birth year. But when I run the .py file inside cmd and as a stand-alone exe file (made with pyinstaller), I can only get to the point where the age input is provided and then when I press 'Enter' for the birth year to output, the program crashes before that last step. Below is the code:
# Capture name and age
name = input('What is your name? ')
age = int(input('How old are you? '))
# Calculate birth year and output
current_year = 2023
birth_year = current_year - age
print()
print('Hello', name + '!', 'You were born in', birth_year, end='.')