Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = 3;
b= 4;
y_correct = 5;
assert(abs(hypotenuse(a,b)-y_correct)<0.0001)
ans =
5
|
2 | Pass |
a = 2;
b = pi * 2;
y_correct = sqrt(a^2+b^2);
assert(abs(hypotenuse(a,b)-y_correct)<0.0001)
ans =
6.5938
|
3 | Pass |
a = randi(10);
b = randi(13);
y_correct = sqrt(a^2+b^2);
assert(abs(hypotenuse(a,b)-y_correct)<0.0001)
ans =
8.9443
|
4 | Pass |
user_solution = fileread('hypotenuse.m');
assert(isempty(strfind(user_solution,'^')));
|
5 | Pass |
assessFunctionAbsence({'sqrt'}, 'FileName', 'hypotenuse.m');
|
Find the sum of all the numbers of the input vector
31970 Solvers
4107 Solvers
given 3 sides, find area of this triangle
680 Solvers
find the maximum element of the matrix
349 Solvers
904 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!