Cody

Solution 2035278

Submitted on 25 Nov 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
a=1; n=1; y_correct=1; assert(abs(Babylonian(a,n)-y_correct)<0.001);

Unrecognized function or variable 'x'. Error in Babylonian (line 2) y = x;nl, Error in Test1 (line 4) assert(abs(Babylonian(a,n)-y_correct)<0.001);

2   Fail
a=10; n=1; y_correct=1; assert(abs(Babylonian(a,n)-y_correct)<0.001);

Unrecognized function or variable 'x'. Error in Babylonian (line 2) y = x;nl, Error in Test2 (line 4) assert(abs(Babylonian(a,n)-y_correct)<0.001);

3   Fail
a=2; n=10; y_correct=1.4142; assert(abs(Babylonian(a,n)-y_correct)<0.001);

Unrecognized function or variable 'x'. Error in Babylonian (line 2) y = x;nl, Error in Test3 (line 4) assert(abs(Babylonian(a,n)-y_correct)<0.001);

4   Fail
a=4; n=10; y_correct=2; assert(abs(Babylonian(a,n)-y_correct)<0.001);

Unrecognized function or variable 'x'. Error in Babylonian (line 2) y = x;nl, Error in Test4 (line 4) assert(abs(Babylonian(a,n)-y_correct)<0.001);

5   Fail
a=0.25; n=10; y_correct=0.5; assert(abs(Babylonian(a,n)-y_correct)<0.001);

Unrecognized function or variable 'x'. Error in Babylonian (line 2) y = x;nl, Error in Test5 (line 4) assert(abs(Babylonian(a,n)-y_correct)<0.001);

6   Fail
a=30; n=4; y_correct=6.0795; assert(abs(Babylonian(a,n)-y_correct)<0.001);

Unrecognized function or variable 'x'. Error in Babylonian (line 2) y = x;nl, Error in Test6 (line 4) assert(abs(Babylonian(a,n)-y_correct)<0.001);

Suggested Problems

More from this Author9