A Python-based simulation tool to perform random coin tosses and analyze the probability distribution of tails in a series of flips.
- 🟡 Single Coin Toss Simulation — Flip a fair coin and get a random outcome: Head or Tail
- 📈 Probability Calculator — Compute the probability of getting a certain number of tails over multiple coin tosses using combinatorial analysis
Head-Tail/
│
├── main.py
│ └── Simulates a single coin toss
│
├── Probability of number of Tails in number of coin flips.py
│ └── Calculates tail distribution over multiple flips
│
├── .idea/
│ └── IDE-specific settings (can be ignored or added to .gitignore)
│
└── README.md
└── Project documentation
- Python 3.x installed on your machine
git clone https://github.com/NewAi25/Head-Tail.git
cd Head-TailTo run the coin toss simulator:
python main.pyTo run the probability calculator:
python "Probability of number of Tails in number of coin flips.py"Single Coin Toss:
Result: Head
Probability Analysis (e.g., 3 tails in 5 flips):
Probability of getting 3 tails in 5 flips: 31.25%
Contributions, suggestions, and bug reports are welcome!
Feel free to fork this repo and submit a pull request.
This project is licensed under the MIT License.