Cody

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

Solution 2619484

Submitted on 27 Jun 2020 by ChrisR
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))

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))

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))

myArea = 69 myPerimeter = 9460

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!