Question: Problem is to be solved using RStudio Let's write `while` loops to practice using the `while` loops. Suppose you went to Vegas and you will
Problem is to be solved using RStudio
Let's write `while` loops to practice using the `while` loops.
Suppose you went to Vegas and you will bet until you are broke. You start with \$100 and bet \$1 each time for the slot machine, and you want to keep track of the money you had after each bet. The probability of winning is 1/216 for getting three jokers. Once you win, you earn $30. Write a `while` loop to simulate this. Also, set the seed number equal to 675 in order to reproduce your simulation result. Show the money after first 6 bets on the screen after this is done.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
