Use the function you wrote in problem A) to simulate n = 100-coin toss. Write a program that counts the quantity of simulated coin tosses before the first crown occurs.
A coin toss (‘mk’) can be simulated with the code line mk = randi (2,1); , where we interpret the value 1 as the page “crown”, and the value 2 as the page “coin” (so this code line gives us (randomly) one of the numbers in the set {1,2}). A) Create program code for a […]