Aug-14-2018, 09:15 AM
Hello, I am pretty new to python and wanted to make a simple program that tells you how long you have been alive for. All I have so far is:
Thanks in Advance.
import datetime day = int(input ("What day were you born e.g '30'/10/2003.")) month = int(input ("What month were you born e.g 30/'10'/2003.")) year = int(input ("What year were you born e.g 30/10/'2003'.")) days = datetime.datetime.now() - datetime.datetime(year, month, day) print (days)However, when I do this, it ends up doing this:
Output:What day were you born e.g '30'/10/2003.18
What month were you born e.g 30/'10'/2003.08
What year were you born e.g 30/10/'2003'.1999
6936 days, 19:07:59.588134
Does anyone know how I can get rid of the time at the end?Thanks in Advance.