Created
September 12, 2017 06:35
-
-
Save Bktero/2a2ab3f80d8e0cd7304e3b8d16d670ce to your computer and use it in GitHub Desktop.
[Python] Is it your birthday?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from datetime import date | |
birth = datetime.strptime("08-08-1987", "%d-%m-%Y").date() | |
today = date.today() | |
if birth.day == today.day and birth.month == today.month: | |
age = today.year - birth.year | |
print("It's your birthday! You're", age,"! : )") | |
print("Let's celebrate!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment