coding | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

coding

what is my fault in this code def main(): import datetime UB = input(" enter your year dear:") Yearnow = datetime.datetime.now().year Yourage = Yearnow - int(UB) print(" Your Age is {}".format(Yourage)) if __name__ == ' __main__ ':main()

16th Jun 2019, 6:44 AM
Rumaysaa hassan youssef
Rumaysaa hassan youssef - avatar
1 Answer
+ 1
It's because your code doesn't run. You don't have to make such complication for your code to work though https://code.sololearn.com/c4DVGLaT8ggd/?ref=app
16th Jun 2019, 6:52 AM
Airree
Airree - avatar