Question: Write a program that simulates coin tossing. For each toss of the coin, the program should print Heads and Tails. Let the program toss the

Write a program that simulates coin tossing. For each toss of the coin, the
program should print Heads and Tails. Let the program toss the coin 100 times
and count the number of times each side of the coin appears. Print the results.
The program should call a function that takes no arguments and returns 0 for tails
and 1 for heads. (Note: If the program realistically simulates the coin tossing,
then each side of the coin should appear approximately half the time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!