Cody

Problem 8058. Kinetic Energy

Solution 2991271

Submitted on 25 Sep 2020 at 14:12
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
m = 20; v = 25 y_correct = 6250; assert(isequal(kinetic_energy(m,v),y_correct))

v = 25

Unrecognized function or variable 'x'. Error in kinetic_energy (line 2) y = x; Error in Test1 (line 4) assert(isequal(kinetic_energy(m,v),y_correct))

2   Fail
m = 1; v = 4; y_correct = 8; assert(isequal(kinetic_energy(m,v),y_correct))

Unrecognized function or variable 'x'. Error in kinetic_energy (line 2) y = x; Error in Test2 (line 4) assert(isequal(kinetic_energy(m,v),y_correct))

3   Fail
m = 6; v = 9; y_correct = 243; assert(isequal(kinetic_energy(m,v),y_correct))

Unrecognized function or variable 'x'. Error in kinetic_energy (line 2) y = x; Error in Test3 (line 4) assert(isequal(kinetic_energy(m,v),y_correct))

Suggested Problems

More from this Author8

Community Treasure Hunt

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

Start Hunting!