Question: Python Programming Does the program (shown below) decide fairly between Person A and Person B. Explain your answer. a) A and B have a coin

Python Programming

Python Programming Does the program (shown below) decide fairly between Person A

Does the program (shown below) decide fairly between Person A and Person B. Explain your answer.

and Person B. Explain your answer. a) A and B have a

a) A and B have a coin which they suspect is unfair, because they tossed it 100 times and got 65 heads They want to decide who goes first in a game and they have no other coin to toss, so they have to use this coin. Describe a method to use this coin to make a fair decision. (There are at least three methods) b) Write a program in Python to simulate the method you developed in Problem 2. Run it 10,000 times import random as rd def WhogoesFirst(): # if the out come is TH, agoes first if it is Ht ,B does Any other outcome and while True: toss1- rd.randint(0, 100) toss2 rd.randint (0, 100) if toss! > 65 and toss2

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!