Cody

Solution 1837546

Submitted on 4 Jun 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
user_solution = fileread('hexagonal_dots_in_circle.m'); assert(isempty(strfind(user_solution,'regexp'))); assert(isempty(strfind(user_solution,'2str'))); assert(isempty(strfind(user_solution,'str2'))); assert(isempty(strfind(user_solution,'interp'))); assert(isempty(strfind(user_solution,'printf'))); assert(isempty(strfind(user_solution,'assert')));

Assertion failed.

2   Pass
r = 0; n_correct = 1; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint2 (line 3) In solutionTest (line 5)]

3   Pass
r = 0.5; n_correct = 1; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint3 (line 3) In solutionTest (line 7)]

4   Pass
r = 1; n_correct = 7; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint4 (line 3) In solutionTest (line 9)]

5   Pass
r = 1.5; n_correct = 7; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint5 (line 3) In solutionTest (line 11)]

6   Pass
r = 2; n_correct = 19; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint6 (line 3) In solutionTest (line 13)]

7   Pass
r = 2.5; n_correct = 19; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint7 (line 3) In solutionTest (line 15)]

8   Pass
r = 3; n_correct = 37; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint8 (line 3) In solutionTest (line 17)]

9   Pass
r = 5; n_correct = 91; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint9 (line 3) In solutionTest (line 19)]

10   Pass
r = 7.5; n_correct = 199; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint10 (line 3) In solutionTest (line 21)]

11   Pass
r = 10; n_correct = 367; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint11 (line 3) In solutionTest (line 23)]

12   Pass
r = 15; n_correct = 823; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint12 (line 3) In solutionTest (line 25)]

13   Pass
r = 20; n_correct = 1459; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint13 (line 3) In solutionTest (line 27)]

14   Pass
r = 25; n_correct = 2263; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint14 (line 3) In solutionTest (line 29)]

15   Pass
r = 50; n_correct = 9061; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint15 (line 3) In solutionTest (line 31)]

16   Pass
r = 100; n_correct = 36295; assert(isequal(hexagonal_dots_in_circle(r),n_correct));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In hexagonal_dots_in_circle (line 2) In ScoringEngineTestPoint16 (line 3) In solutionTest (line 33)]

Suggested Problems

More from this Author18