Assignment #61. A gambler enters a casino with an amount of money (capital); the objective is to get a larger amount (goal) without going broke, since the casino does not give credit. The gambler adopts the simple strategy of betting one dollar at a time. Bets are repeated until the gambler goes broke or the capital reaches the goal. If the probability of winning one bet is 1/2 find the probability of reaching the goal before going broke. Write an ISETL func to simulate this experiment.2. A gambler enters a casino with an amount of money (capital); the objective is to get a larger amount (goal) without going broke, since the casino does not give credit. The gambler adopts the bold strategy of betting all the captial when it is less than half the goal and betting the amount needed to reach the goal when the capital is more than half the goal. Bets are repeated until the gambler goes broke or the capital reaches the goal. If the probability of winning one bet is p find the probability of reaching the goal before going broke. Do some cases by hand and also write an ISETL func to compute the answer.3. Here are two simulations of waiting time random variables. In each case find the mean of the random variable. BeatFirst := func(); local first, wait; first := random(1.0); wait := 1; while first > random(1.0) do wait := wait + 1; end; return wait; end; BeatPrev := func(); local prev, curr, wait; prev := random(1.0); curr := random(1.0); wait := 2; while prev > curr do wait := wait +1; prev := curr; curr := random(1.0); end; return wait; end;4. Below is the simulation of a family of random variables (one for each j). Write an Isetl func (of j) that will return the means of these random variables. Jump := func(j); local wait; wait := 0; while j /= 0 do wait := wait + 1; j := random(j-1); end; return wait; end;