0

How can i create a GUI in python?

I need to make program that calculate you age according to your dop (date of birth)

13th Dec 2018, 12:43 PM
Abdala Osama Gaming
Abdala Osama Gaming - avatar
7 odpowiedzi
0
Use Tkinter for the GUI. For the functionality, my first thought is to take the users input (will have to be formatted) and subtract it from date.today() and that should give you what you seek. date_entry = input('Enter a date in YYYY-MM-DD format') year, month, day = map(int, date_entry.split('-')) date1 = datetime.date(year, month, day)
13th Dec 2018, 12:49 PM
Chris Ford
Chris Ford - avatar
+ 1
In the python docs, date can do many things and be formatted many ways. https://docs.python.org/3/library/datetime.html
13th Dec 2018, 1:03 PM
Chris Ford
Chris Ford - avatar
+ 1
Great to hear!!!
13th Dec 2018, 9:55 PM
Chris Ford
Chris Ford - avatar
0
Ok thanks for that complete answer , another question is the date.today() func returns the the day , month or year? And again thanks you
13th Dec 2018, 12:55 PM
Abdala Osama Gaming
Abdala Osama Gaming - avatar
0
Thank you
13th Dec 2018, 1:07 PM
Abdala Osama Gaming
Abdala Osama Gaming - avatar
0
I have been watching video all morning so i learnt a lot about it , i think i can complete my project now thanks to you all
13th Dec 2018, 9:52 PM
Abdala Osama Gaming
Abdala Osama Gaming - avatar
0
See you on another discussion , and who knows i may end your confusion like you did to me someday
13th Dec 2018, 9:59 PM
Abdala Osama Gaming
Abdala Osama Gaming - avatar