Cody

Solution 1367731

Submitted on 4 Dec 2017
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
expr = "(+ 1 1 1 1 1)"; assert(isequal(eval_lisp(expr), 5));

Assertion failed.

2   Fail
expr = "(+ 1 5)"; assert(isequal(eval_lisp(expr), 6));

Assertion failed.

3   Fail
expr = "(+ 1 1 1 1 1 1 1 1 1 1 1 1 1)"; assert(isequal(eval_lisp(expr), 13));

Assertion failed.

4   Fail
expr = "(+ 1 2 3 4 5 6 7 8 9 10)"; assert(isequal(eval_lisp(expr), 55));

Assertion failed.

5   Fail
expr = "(* 1 2 3 4 5 6 7 8 9 10)"; assert(isequal(eval_lisp(expr), 3628800));

Assertion failed.

6   Fail
expr = "(* (* 10 (+ 1 4)) (+ 10 (/ 12 2 3) 1) 0.1)"; assert(isequal(eval_lisp(expr), 65));

Assertion failed.

Suggested Problems

More from this Author56