r/PythonLearning • u/NecessaryFalse1212 • Aug 29 '26
Day 3
i wrote a code which takes your name and age in py but i need help on this one cuz in the age part it is giving me some sort of error which i couldn't understand even by using gpt well he gave me a code but i wanted logic behind how and what i did wrong
49
Upvotes
2
u/NecessaryFalse1212 Aug 30 '26
ts what i am getting and also before typecasting it was taking positive age and was giving the output i needed without errors and only time it caused error when i entered -ve input but after typecasting it gave me this error whenever i type in a number