Cody

Solution 1636204

Submitted on 1 Oct 2018 by Jean-Marie Sainthillier
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 ' _ ' '|_ ' ' _|'

Suggested Problems

More from this Author18