osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help a noob out


On Thu, May 2, 2019 at 7:26 PM <felixen989 at hotmail.co.uk> wrote:
>
> Hey guys, can someone quickly explain why this piece of code doesn't work? (I'm really new to Python)
>
> birth_year = input("What year are you born? ")
> current_year = 2019
> age = current_year - birth_year
> print(age)

Have you looked at the exception message you get back? It's fairly clear.

ChrisA