This is code should outputs my age but it doesn't and I don't why it's happening, can someone pls enlighten me?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

This is code should outputs my age but it doesn't and I don't why it's happening, can someone pls enlighten me??

birth_year = input("birth_year ") age = 2019-int("birth_year") print(age)

25th Jun 2022, 6:26 PM
MAnny
MAnny - avatar
2 Answers
+ 2
"birth_day" is a string. birth_day is a variable. Remove quotes in 2nd time..
25th Jun 2022, 6:29 PM
Jayakrishna 🇮🇳
+ 2
Jayakrishna🇮🇳 thank you for enlightening me 💙
25th Jun 2022, 6:36 PM
MAnny
MAnny - avatar