DEV Community

Cover image for Cool Python Project 1: Birthday Estimator
Abhi Develops - SunTech
Abhi Develops - SunTech

Posted on

Cool Python Project 1: Birthday Estimator

Hi Everyone! Welcome to Cool Python Projects!
In this post I will be showing you how to make a Birthday Estimator in Python. Please remember to follow me to stay updated on any new projects.

Python Code:

import datetime

def get_birthday_from_user():

   year = int(input('What year were you born? '))

   month = int(input('What month were you born? '))

   day = int(input('What day were you born? ')),month,day)

   return user_bday

def compute_days_between_dates(bday2,today2):

   bday2 =,bday2.month,

   days3 = bday2 - today2

   print(days3, type(days3))

   return days3.days

def print_birthday_information(bday4):

   if bday4 < 0:

       print('Your Birthday was {0} days ago!'.format(-bday4))

def main ():

   user_bday2 = get_birthday_from_user()

   today =

   days_to_bday = compute_days_between_dates(user_bday2,today)


Enter fullscreen mode Exit fullscreen mode

I hope you enjoyed this Python project.

All the projects code in the series

Top comments (0)