Question: 9 . 1 2 LAB: Flipping for tails Given main ( ) and GVCoin class, complete function flip _ for _ tails ( ) in
LAB: Flipping for tails
Given main and GVCoin class, complete function flipfortails in main.py that counts and returns the number of flips taken to achieve a desired number of tails. Function flipfortails has a GVCoin object and an integer representing the desired number of tails as parameters.
Note: For testing purposes, a GVCoin object is created in the main function using a pseudorandom number generator with a fixed seed value. The program uses a seed value of during development, but when submitted, a different seed value will be used for each test case.
Ex: If the GVCoin object is created with a seed value of and the desired number of tails is then the function flipfortails returns and the program outputs:
Total number of flips for tails:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
