Cody

Solution 881202

Submitted on 24 Apr 2016 by Peng Liu
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   Pass
a=1; n=1; y_correct=1; assert(abs(Babylonian(a,n)-y_correct)<0.001);

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

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

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

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

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