Cody

Solution 1566729

Submitted on 21 Jun 2018 by Tim
  • Size: 18
  • This is the leading solution.
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
N = 0; y_correct =... [' _ ' '| |' '|_|'] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' _ ' '| |' '|_|'

2   Pass
N = 1; y_correct =... [' ' ' |' ' |'] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' ' ' |' ' |'

3   Pass
N = 2; y_correct =... [' _ ' ' _|' '|_ '] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' _ ' ' _|' '|_ '

4   Pass
N = 3; y_correct =... [' _ ' ' _|' ' _|'] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' _ ' ' _|' ' _|'

5   Pass
N = 4; y_correct =... [' ' '|_|' ' |'] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' ' '|_|' ' |'

6   Pass
N = 9; y_correct =... [' _ ' '|_|' ' _|'] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' _ ' '|_|' ' _|'

7   Pass
N = 8; y_correct =... [' _ ' '|_|' '|_|'] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' _ ' '|_|' '|_|'

8   Pass
N = 6; y_correct =... [' _ ' '|_ ' '|_|'] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' _ ' '|_ ' '|_|'

9   Pass
N = 5; y_correct =... [' _ ' '|_ ' ' _|'] assert(isequal(seven_segment(N),y_correct))

y_correct = 3×3 char array ' _ ' '|_ ' ' _|'