Skip to content

Contributing my Python project by the name of Birthday Paradox in thi…#86

Open
AdyaTech wants to merge 1 commit intoGrow-with-Open-Source:mainfrom
AdyaTech:Birthday-Paradox
Open

Contributing my Python project by the name of Birthday Paradox in thi…#86
AdyaTech wants to merge 1 commit intoGrow-with-Open-Source:mainfrom
AdyaTech:Birthday-Paradox

Conversation

@AdyaTech
Copy link
Copy Markdown

@AdyaTech AdyaTech commented May 6, 2026

🎂 Birthday Paradox Simulation (using Python)

📌 Introduction

The Birthday Paradox is a probability concept that shows how surprisingly likely it is for two people in a group to share the same birthday. Even in relatively small groups, the chances of a match are much higher than most people intuitively expect.

This Python project uses a Monte Carlo simulation to repeatedly generate random birthdays and estimate the probability of at least one shared birthday in a group.


🚀 Features

  • Generates random birthdays for a given number of people
  • Detects if any two birthdays match
  • Runs 100,000 simulations to estimate real probability
  • Simple command-line interaction
  • Uses only built-in Python libraries (datetime, random)

💻 Example

How many birthdays shall I generate? (Max 100)
> 23

Here are 23 birthdays:
Jan 1, Mar 5, Jul 12, ...

In this simulation, multiple people have a birthday on Jul 12

Generating 23 random birthdays 100,000 times...
100,000 simulations run.

Out of 100,000 simulations of 23 people, there was a
matching birthday in that group 50789 times.
That means ~50.79% probability.

📸 Live Demo (Screenshot)

image

@github-actions github-actions Bot requested a review from iamwatchdogs May 6, 2026 09:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

👋 @AdyaTech
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant