Question: Guessing Birthdays. Write a program (called q3.py) that guesses birthdays. You can determine the date of the month when someone was born by asking five

Guessing Birthdays. Write a program (called q3.py) that guesses birthdays. You can determine the date of the month when someone was born by asking five questions. Each question asks whether the day is in each of the five sets of numbers, which are shown below in Figure 1.Guessing Birthdays. Write a program (called q3.py) that guesses birthdays. You can

The birthday is the sum of the first numbers in the sets where the date appears. For example, if the birthday is 19, it appears in Set 1, Set 2, and Set 5. The first numbers in these three sets are 1, 2, and 16. Their sum is 19.

Example:

determine the date of the month when someone was born by asking

five questions. Each question asks whether the day is in each of

1 35723 6 9 1113 15 10 11 14 15 12 13 1415 17 192123 1819 22 23 2 21 22 23 25272931262730 31 28 29 30 31 Set 1 Set 2 Set 3 8 9 0 16 17 18 1 12 13 14 15 20 21 22 23 24252627 242526 27 28 29 30 31 282930 31 Set 4 Set 5 Figure 1: The five sets of numbers for guessing birthdays

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!