Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7
Read comment for explanation. Fixed version of ur code :
13th Feb 2019, 3:01 AM
Arushi Singhania
Arushi Singhania - avatar
+ 3
# Use int() function to convert the input from str to int. s = int(input("year of your birth\n")) v = int(input("what year is it?\n")) # While doing operation on variables, don't use quotes. print(v-s) Works great
13th Feb 2019, 3:19 AM
BroFar - avatar