Cody

Solution 1251237

Submitted on 14 Aug 2017 by LY Cao
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
odds = [1.1] ; bets= [100] ; avg_correct = -45.00; assert(isequal(avg_gain(odds,bets),avg_correct))

ans = -45

2   Pass
odds = [1.1 1.3 2.5] ; bets= [100 200 300] ; avg_correct = -40.00; assert(isequal(avg_gain(odds,bets),avg_correct))

ans = -40

3   Pass
odds = [1.33 1.3 2.5 5.13] ; bets= [100 200 300 10] ; avg_correct = -12.85; assert(isequal(avg_gain(odds,bets),avg_correct))

ans = -12.8500

Suggested Problems