Cody

# Problem 44524. Perimeter of a quadrilateral

Solution 2062440

Submitted on 18 Dec 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
n=10; e=10; s=10; w=10; t=2; y_correct=113.1371; assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)

a = 20 b = 20 c = 20 d = 20 x1 = 28.2843 x2 = 28.2843 x1 = 28.2843 x1 = 28.2843

Unrecognized function or variable 'x3'. Error in total_distance (line 12) x1+x2+x3+x4 Error in Test1 (line 7) assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)

2   Fail
n=15; e=7; s=3; w=15; t=1.5; y_correct=91.0185; assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)

a = 22.5000 b = 4.5000 c = 10.5000 d = 22.5000 x1 = 24.8294 x2 = 31.8198 x1 = 11.4237 x1 = 22.9456

Unrecognized function or variable 'x3'. Error in total_distance (line 12) x1+x2+x3+x4 Error in Test2 (line 7) assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)

3   Fail
n=11; e=21; s=31; w=41; t=1.7; y_correct=263.5003; assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)

a = 18.7000 b = 52.7000 c = 35.7000 d = 69.7000 x1 = 40.3011 x2 = 72.1649 x1 = 63.6536 x1 = 87.3807

Unrecognized function or variable 'x3'. Error in total_distance (line 12) x1+x2+x3+x4 Error in Test3 (line 7) assert(abs(total_distance(n,e,s,w,t)-y_correct)<1e-4)