Cody

Problem 2402. Area of a Square

Solution 2824440

Submitted on 12 Aug 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
r = 2; y_correct = 16; assert(isequal(area_sqr(r),y_correct))

Unrecognized function or variable 'l'. Error in area_sqr (line 2) A= l^2-3.14*r^2; Error in Test1 (line 3) assert(isequal(area_sqr(r),y_correct))

2   Fail
r = 3; y_correct = 36; assert(isequal(area_sqr(r),y_correct))

Unrecognized function or variable 'l'. Error in area_sqr (line 2) A= l^2-3.14*r^2; Error in Test2 (line 3) assert(isequal(area_sqr(r),y_correct))

3   Fail
r = 25; y_correct = 2500; assert(isequal(area_sqr(r),y_correct))

Unrecognized function or variable 'l'. Error in area_sqr (line 2) A= l^2-3.14*r^2; Error in Test3 (line 3) assert(isequal(area_sqr(r),y_correct))

Suggested Problems

More from this Author3