Cody

# Problem 44682. Numbers on 7-segment

Solution 1555295

Submitted on 9 Jun 2018 by J-G van der Toorn
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 ' _ ' '| |' '|_|' ans = 3×3 char array ' _ ' '| |' '|_|'

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

### Community Treasure Hunt

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

Start Hunting!