Cody

Solution 1688117

Submitted on 6 Dec 2018
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   Fail
vf = 5.5; vp = 6; N = 1; winner = 'Pete'; assert(isequal(chickenRace(vf,vp,N),winner))

winner = -0.5152 winner = 'Fred'

Assertion failed.

2   Pass
vf = 5.5; vp = 6; N = 2; winner = 'Fred'; assert(isequal(chickenRace(vf,vp,N),winner))

winner = 0.4848 winner = 'Fred'

3   Pass
vf = 6; vp = 6; N = 2; winner = 'Fred'; assert(isequal(chickenRace(vf,vp,N),winner))

winner = 2 winner = 'Fred'

Suggested Problems

More from this Author25