Cody

Problem 202. the fly, the train, the second train, and their Zeno's paradox

Solution 3081776

Submitted on 6 Oct 2020
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
v1 = 1; v2 = 2; v3 = 3; d = 10; assert(abs(thefly(v1,v2,v3,d)-10)/10<.01)

t = 3.3333 d = 10

Output argument "s" (and maybe others) not assigned during call to "thefly". Error in Test1 (line 5) assert(abs(thefly(v1,v2,v3,d)-10)/10<.01)

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

t = 2.5000 d = 125

Output argument "s" (and maybe others) not assigned during call to "thefly". Error in Test2 (line 5) assert(abs(thefly(v1,v2,v3,d)-125)/125<.01)

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

t = 0.1667 d = 15

Output argument "s" (and maybe others) not assigned during call to "thefly". Error in Test3 (line 5) assert(abs(thefly(v1,v2,v3,d)-15)/15<.01)

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

t = 2 d = 90

Output argument "s" (and maybe others) not assigned during call to "thefly". Error in Test4 (line 5) assert(abs(thefly(v1,v2,v3,d)-90)/90<.01)

Suggested Problems

More from this Author38

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!