Question: PYTHON Modify the given program so it prints Happy Birthday if today's persons birthday. Ex. input =03/12/1995 and today's date = 03/12/2017, the person just

PYTHON

Modify the given program so it prints "Happy Birthday" if today's persons birthday.

Ex. input =03/12/1995 and today's date = 03/12/2017, the person just turned 21 today so he/she is welcome and also print Happy Birthday.

PYTHON

PYTHON Modify the given program so it prints "Happy Birthday" if today's

import datetime |from dateut?1.relativedelta ?mport relativedelta todaydatetime.date.today () bday-input-: input ('Enter birthday mm/ dd/ year format: ') in month, day, year bday_input.split("/') bday datetime.date (int (year), int (month), int (day) ) diff relativedelta (today, bday) if diff.years 21: print('Welcome! ' else: print('You are not old enough')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!