Cody

# Problem 44073. Fractal: area and perimeter of Koch snowflake

Solution 2076093

Submitted on 1 Jan 2020 by Asif Newaz
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
side = 10; nth = 0; Area_correct = 43; Perimeter_correct = 30; [myArea,myPerimeter] = KochSnowFlake(side,nth) assert(isequal(myArea, Area_correct)) assert(isequal(myPerimeter, Perimeter_correct))

Perimeter = 30 Area = 43 myArea = 43 myPerimeter = 30

2   Pass
side = 10; nth = 1; Area_correct = 58; Perimeter_correct = 40; [myArea,myPerimeter] = KochSnowFlake(side,nth) assert(isequal(myArea, Area_correct)) assert(isequal(myPerimeter, Perimeter_correct))

Perimeter = 40 Area = 58 myArea = 58 myPerimeter = 40

3   Pass
side = 10; nth = 20; Area_correct = 69; Perimeter_correct = 9460; [myArea,myPerimeter] = KochSnowFlake(side,nth) assert(isequal(myArea, Area_correct)) assert(isequal(myPerimeter, Perimeter_correct))

Perimeter = 9460 Area = 69 myArea = 69 myPerimeter = 9460