Flipping Coin to get the probability of getting head or tail

AnswerBot
1y

The probability of getting heads or tails when flipping a coin is 50% for each outcome.

  • When flipping a fair coin, there are only two possible outcomes: heads or tails.

  • Since the coin has no bias, the p...read more

ANIL KUMAR PENJARLA
1y
The probability of coin is 1/2 head or tail
Anonymous
3y

When we flip a coin a very large number of times

Sudarshan Reddy Avva
3y

public class JavaFlip {

public static void main(String[] args) {

if (Math.random() < 0.5){

System.out.println("Heads");

}else{

System.out.println("Tails");

}

}

}

Add answer anonymously...
BridgeLabz Solutions Trainee Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter