Cody

Solution 1837412

Submitted on 4 Jun 2019 by YIFEI ZHANG
  • Size: 10
  • This is the leading solution.
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
v1 = 1; v2 = 2; v3 = 3; d = 10; assert(abs(thefly(v1,v2,v3,d)-10)/10<.01)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In thefly (line 2) In ScoringEngineTestPoint1 (line 5) In solutionTest (line 3)]

2   Pass
v1 = 20; v2 = 20; v3 = 50; d = 100; assert(abs(thefly(v1,v2,v3,d)-125)/125<.01)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In thefly (line 2) In ScoringEngineTestPoint2 (line 5) In solutionTest (line 5)]

3   Pass
v1 = 40; v2 = 20; v3 = 90; d = 10; assert(abs(thefly(v1,v2,v3,d)-15)/15<.01)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In thefly (line 2) In ScoringEngineTestPoint3 (line 5) In solutionTest (line 7)]

4   Pass
v1 = 40; v2 = 15; v3 = 45; d = 110; assert(abs(thefly(v1,v2,v3,d)-90)/90<.01)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In thefly (line 2) In ScoringEngineTestPoint4 (line 5) In solutionTest (line 9)]

Suggested Problems

More from this Author38