Assignment #41. Write an ISETL func as described below. Run your simulation a number of times while !watch -ing an appropriate id; when you are sure that the func is working correctly !unwatch and collect data to estimate the average wait. Wait := func(); $ requires: nothing $ effects : returns the number of tosses of a fair coin $ until there are more heads than tails Find the probability that the number of heads gets to be larger than the number of tails. Find the expected waiting time by exact methods. Hint: it may be easier to solve these last two problems for a biased coin.2. Write an ISETL func to simulate the game of craps. The rules are: two dice are tossed. If the sum is 7 or 11 you win; if the sum is 2,3 or 12 you lose. Otherwise the dice are tossed until the sum is a 7 or the first sum is repeated; you lose if 7 comes before the first sum is repeated and you win if the first sum is repeated before a 7. Next, find by exact methods the probability of winning a game of craps and the expected length of a game.3. Write the ISETL func to compute the exact rational probability of getting a particular sum when tossing a number of dice. ProbSum := func(sum,numDice); $ requires: sum and numDice are integers; $ the directive " > !rational on " is active $ effects : returns the rational probability of getting $ the sum when numDice dice are tossed A test of the correctness of your func is to use it to find the expected sum when numDice are tossed. For this test you will have to choose some specific values for numDice.4. A box contains 1000 one dollar bills. You take 100 bills from the box and get to keep the bills with the serial numbers that are greater than the greatest serial number that remains in the box. What is the fair price to play this game?5. Use the ISETL funcs that returns the probability that exactly n cards are drawn, without replacement, from a deck before the first ace is drawn (This was problem 5 of Assignment 3) to solve the corresponding problem in assignment 1.