Happy Birthday!

happy-birthdayFor this challenge we are going to write a Python program which will ask the end-user to enter their date of birth in the following format: dd/mm/yyyy.

The program will then calculate and display the following information:

  • The age of the user,
  • The number of days the user has lived for,
  • The week day (Monday to Sunday) corresponding to their Date of Birth,
  • The number of days left until the user’s next birthday,
  • A “Happy Birthday” message if today is the user’s birthday!

Learning Objectives


By completing this challenge you are learning various techniques to manipulate and format dates. These include formating a date in the dd/mm/yyyy format, retireving today’s date or calculating the difference in days or years between two dates.

Solution



unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 3 / 5. Vote count: 9

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: ,