Cody

# Problem 44682. Numbers on 7-segment

Solution 1560527

Submitted on 14 Jun 2018 by James
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 ' _ ' '| |' '|_|' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'

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

y_correct = 3×3 char array ' ' ' |' ' |' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'

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

y_correct = 3×3 char array ' _ ' ' _|' '|_ ' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'

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

y_correct = 3×3 char array ' _ ' ' _|' ' _|' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'

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

y_correct = 3×3 char array ' ' '|_|' ' |' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'

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

y_correct = 3×3 char array ' _ ' '|_|' ' _|' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'

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

y_correct = 3×3 char array ' _ ' '|_|' '|_|' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'

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

y_correct = 3×3 char array ' _ ' '|_ ' '|_|' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'

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

y_correct = 3×3 char array ' _ ' '|_ ' ' _|' x = 10×9 char array ' _ | ||_|' ' | |' ' _ _||_ ' ' _ _| _|' ' |_| |' ' _ |_ _|' ' _ |_ |_|' ' _ | | |' ' _ |_||_|' ' _ |_| _|'