Cody

Solution 1891644

Submitted on 4 Aug 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
assert(abs(calculate_PAI-pi)<1e-7);

Error: File: calculate_PAI.m Line: 3 Column: 1 The end operator must be used within an array index expression. Error in Test1 (line 1) assert(abs(calculate_PAI-pi)<1e-7);

2   Pass
filetext = fileread('calculate_PAI.m'); assert(isempty(strfind(filetext, 'pi')),'pi forbidden'); assert(isempty(strfind(filetext, '3.14159')),'3.14159 forbidden'); assert(isempty(strfind(filetext, 'str')),'str function forbidden');

Suggested Problems

More from this Author1