Cody

Problem 2017. Side of an equilateral triangle

Solution 2102731

Submitted on 23 Jan 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
A = 1; x_correct = 2/sqrt(sqrt(3)); tolerance = 1e-12; assert(abs( side_length(A) - x_correct ) < tolerance)

Unrecognized function or variable 'b'. Error in side_length (line 2) x = sqrt(2*b^4) Error in Test1 (line 4) assert(abs( side_length(A) - x_correct ) < tolerance)

2   Fail
A = sqrt(3); x_correct = 2; tolerance = 1e-12; assert(abs(side_length(A) - x_correct) < tolerance)

Unrecognized function or variable 'b'. Error in side_length (line 2) x = sqrt(2*b^4) Error in Test2 (line 4) assert(abs(side_length(A) - x_correct) < tolerance)

3   Fail
A = 2; x_correct = 2*sqrt(2)/sqrt(sqrt(3)); tolerance = 1e-12; assert(abs(side_length(A) - x_correct) < tolerance)

Unrecognized function or variable 'b'. Error in side_length (line 2) x = sqrt(2*b^4) Error in Test3 (line 4) assert(abs(side_length(A) - x_correct) < tolerance)