Cody

Problem 44620. generate capital english alphabets

Solution 2688623

Submitted on 13 Jul 2020 by Ramesh Kumar V
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 = 1; y_correct = 'A'; assert(isequal(generate_alphabets(n),y_correct))

str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' letters = 'A'

2   Pass
n = 6; y_correct = 'ABCDEF'; assert(isequal(generate_alphabets(n),y_correct))

str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' letters = 'ABCDEF'

3   Pass
n = 26; y_correct = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; assert(isequal(generate_alphabets(n),y_correct))

str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

4   Pass
n = 12; y_correct = 'ABCDEFGHIJKL'; assert(isequal(generate_alphabets(n),y_correct))

str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' letters = 'ABCDEFGHIJKL'

5   Pass
n = 21; y_correct = 'ABCDEFGHIJKLMNOPQRSTU'; assert(isequal(generate_alphabets(n),y_correct))

str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' letters = 'ABCDEFGHIJKLMNOPQRSTU'

6   Pass
n = 3; y_correct = 'ABC'; assert(isequal(generate_alphabets(n),y_correct))

str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' letters = 'ABC'