Please answer it in Python In order not to forget to wish the birthday of his loved ones, Alzheimer wants to memorize and manage their dates of birth via a computer program in Python. At first, it is assumed that Al has already computerized the birthday dates of his relatives in a dictionary. The keys in this dictionary are the first names of his relatives (it is assumed that no two people with the same first name). The value associated with each key corresponds to the birthday of the corresponding person, in the form of a 3-item list, containing in the order the day, month and year of birth. The day is considered to be an integer between 1 and 31, the month an integer between 1 and 12 and the year of birth an integer between 1900 and 2021. Thus the list [17, 5, 2021] corresponds to the date of May 17, 2021. This may lead to writing dates that do not exist (e.g. [31, 4, 2003]) but this is not addressed in the exercise. Here is an example of a dictionary containing the dates of birth of 5 friends of Al in this format: dictionary_friends={'Chiara': [11, 10, 1998], 'Omar': [22, 11, 2001], 'Ingrid': [12, 6, 2002], 'Marc': [27, 8, 1983], 'Youri': [12, 6, 1983]}. We wish to be able to wish the birthday of all loved ones born on a given day. Write a function feter_anniversaire that takes as arguments the dictionary of dates of birth ddates and the list date_jour corresponding to today's date. The function then displays a message for each loved one whose the birthday on that date, specifying its age, according to the format of the example below. Thus, if the dictionary_friends is the example given at the beginning of the exercise: the call feter_anniversaire(dictionary_friends, [12, 6, 2021]) will display: Happy birthday Ingrid you are 19 years old! Happy birthday Youri you are 38 years old! call feter_anniversaire(dictionary_friends, [17, 5, 2020]) will display: No birthday today.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please answer it in Python

In order not to forget to wish the birthday of his loved ones, Alzheimer wants to memorize and manage their dates of birth via a computer program in Python. At first, it is assumed that Al has already computerized the birthday dates of his relatives in a dictionary. The keys in this dictionary are the first names of his relatives (it is assumed that no two people with the same first name). The value associated with each key corresponds to the birthday of the corresponding person, in the form of a 3-item list, containing in the order the day, month and year of birth. The day is considered to be an integer between 1 and 31, the month an integer between 1 and 12 and the year of birth an integer between 1900 and 2021. Thus the list [17, 5, 2021] corresponds to the date of May 17, 2021. This may lead to writing dates that do not exist (e.g. [31, 4, 2003]) but this is not addressed in the exercise. Here is an example of a dictionary containing the dates of birth of 5 friends of Al in this format:

dictionary_friends={'Chiara': [11, 10, 1998], 'Omar': [22, 11, 2001], 'Ingrid': [12, 6, 2002], 'Marc': [27, 8, 1983], 'Youri': [12, 6, 1983]}.

We wish to be able to wish the birthday of all loved ones born on a given day.

Write a function feter_anniversaire that takes as arguments the dictionary of dates of birth ddates and

the list date_jour corresponding to today's date. The function then displays a message for each loved one whose the birthday on that date, specifying its age, according to the format of the example below.

Thus, if the dictionary_friends is the example given at the beginning of the exercise:

  • the call feter_anniversaire(dictionary_friends, [12, 6, 2021]) will display:

Happy birthday Ingrid you are 19 years old!

Happy birthday Youri you are 38 years old!

  • call feter_anniversaire(dictionary_friends, [17, 5, 2020]) will display:

No birthday today.

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY