Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.image text in transcribed

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:

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

Understand how emergent change occurs.

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago