Cody

# Problem 42689. Distance a ball travels after throwing vertically

Solution 1726378

Submitted on 13 Feb 2019
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
v = 20; s=2; d = 20; assert(isequal(distance(s,v),d));

d = 20

Undefined function or variable 'u'. Error in distance (line 3) if s<=u/10 Error in Test1 (line 4) assert(isequal(distance(s,v),d));

2   Fail
v = 20; s=2.5; d = 21.25; assert(isequal(distance(s,v),d));

d = 18.7500

Undefined function or variable 'u'. Error in distance (line 3) if s<=u/10 Error in Test2 (line 4) assert(isequal(distance(s,v),d));

3   Fail
v = 20; s=12.5; d=40; assert(isequal(distance(s,v),d));

d = -531.2500

Undefined function or variable 'u'. Error in distance (line 3) if s<=u/10 Error in Test3 (line 4) assert(isequal(distance(s,v),d));

4   Fail
v=50; s=10; d=250; v=5; s=5; d=2.5; assert(isequal(distance(s,v),d));

d = -100

Undefined function or variable 'u'. Error in distance (line 3) if s<=u/10 Error in Test4 (line 8) assert(isequal(distance(s,v),d));

### Community Treasure Hunt

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

Start Hunting!