Question: 6 . Use Python ( in a Jupyter notebook ) to write a program that will do the following. ( a ) Write a function

6. Use Python (in a Jupyter notebook) to write a program that will do the following.
(a) Write a function birthday(n) that:
(i) generates a vector containing n numbers uniformly distributed on {1,2,...,365}
(think of this as the list of birthdays of n people. You can use the randint function
from numpy.random.),
(ii) returns 1 if there is at least one pair of people with coinciding birthdays (a
match), and 0 otherwise

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!