Cody

Solution 1675166

Submitted on 16 Nov 2018 by James
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
x = 1; y_correct = 0; assert(isequal(rollOutIfOptimus(x),y_correct))

2   Pass
x = 7; y_correct = 7; % x_coordinate=0+7 assert(isequal(rollOutIfOptimus(x),y_correct))

3   Pass
x = 13; y_correct = 20;% x_coordinate=7+13 assert(isequal(rollOutIfOptimus(x),y_correct))

4   Pass
x = 4; y_correct = 20; assert(isequal(rollOutIfOptimus(x),y_correct))

5   Pass
x = 5; y_correct = 25;% x_coordinate=20+5 assert(isequal(rollOutIfOptimus(x),y_correct))