Cody

# Problem 370. Gambler?

Solution 1353774

Submitted on 22 Nov 2017 by David Verrelli
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
tic for k=1:3 wealth=@()1000000; status_correct = 'Millionaire'; assert(isequal(reporter(wealth),status_correct)) wealth=@()999000*(1+rand/100); status_correct = 'Likely'; assert(isequal(reporter(wealth),status_correct)) wealth=@()750000*(1+rand); status_correct = 'Likely'; assert(isequal(reporter(wealth),status_correct)) wealth=@()600000*(1+rand); status_correct = 'Gambler'; assert(isequal(reporter(wealth),status_correct)) end assert(toc<2)

overOneMillion = 1000 prob = 1 overOneMillion = 908 prob = 0.9080 overOneMillion = 652 prob = 0.6520 overOneMillion = 351 prob = 0.3510 overOneMillion = 1000 prob = 1 overOneMillion = 897 prob = 0.8970 overOneMillion = 684 prob = 0.6840 overOneMillion = 356 prob = 0.3560 overOneMillion = 1000 prob = 1 overOneMillion = 907 prob = 0.9070 overOneMillion = 663 prob = 0.6630 overOneMillion = 333 prob = 0.3330