Skip to content

NewAi25/Head-Tail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪙 Head-Tail

A Python-based simulation tool to perform random coin tosses and analyze the probability distribution of tails in a series of flips.


📌 Features

  • 🟡 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

🗂️ Repository Structure

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

🚀 Getting Started

✅ Prerequisites

  • Python 3.x installed on your machine

📥 Installation

git clone https://github.com/NewAi25/Head-Tail.git
cd Head-Tail

▶️ Usage

To run the coin toss simulator:

python main.py

To run the probability calculator:

python "Probability of number of Tails in number of coin flips.py"

📊 Example Output

Single Coin Toss:

Result: Head

Probability Analysis (e.g., 3 tails in 5 flips):

Probability of getting 3 tails in 5 flips: 31.25%

💡 Contributing

Contributions, suggestions, and bug reports are welcome!
Feel free to fork this repo and submit a pull request.


📄 License

This project is licensed under the MIT License.

About

It a a project to randomly generate head or tail

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages