Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do this in Python 3.8 and without numpy. I really do appreciate it! Question 4 (10 Points) My Birthday Function Write a well-documented Python

Please do this in Python 3.8 and without numpy. I really do appreciate it!

image text in transcribed

Question 4 (10 Points) My Birthday Function Write a well-documented Python program, hmwk4Q4.py, that simulates a single trial of a person walking into a room on N people and determining if their birthday matches any of the other N people in the room. Design a function myBirthday(N) that returns True if a match is found, or False if no match is found. Import the python random number module into your program. On a single trial, with a user input 200 people, you may not find someone with your birthday. If you manually rerun the simulation ten times, your code, however, should see that approximately four (4.22 exactly) times there is a match to your birthday. Grading: Correct main() function (+4 points). Include_name__ is set to '_main__' to ensure the program initiates when it is run (+2 points). Correct myBirthday(N) function (+4 points)

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

Choose an appropriate organizational pattern for your speech

Answered: 1 week ago

Question

Writing a Strong Conclusion

Answered: 1 week ago