Cody

# Problem 43169. Frequency Analysis of Text

Solution 1614970

Submitted on 23 Aug 2018 by Srishti Saha
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
x = 'This is a very good day' y_correct = [2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 0 1 0 0 2 0] assert(isequal(count_alphabet(x),y_correct))

x = 'This is a very good day' y_correct = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 0 1 0 0 2 0 f = [] letters = 'abcdefghijklmnopqrstuvwxyz' append = 2 f = 2 append = 0 f = 2 0 append = 0 f = 2 0 0 append = 2 f = 2 0 0 2 append = 1 f = 2 0 0 2 1 append = 0 f = 2 0 0 2 1 0 append = 1 f = 2 0 0 2 1 0 1 append = 1 f = 2 0 0 2 1 0 1 1 append = 2 f = 2 0 0 2 1 0 1 1 2 append = 0 f = 2 0 0 2 1 0 1 1 2 0 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 append = 2 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 append = 1 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 append = 2 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 append = 1 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 0 append = 1 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 0 1 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 0 1 0 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 0 1 0 0 append = 2 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 0 1 0 0 2 append = 0 f = 2 0 0 2 1 0 1 1 2 0 0 0 0 0 2 0 0 1 2 1 0 1 0 0 2 0

2   Pass
x = 'hAvE you Been haVInG fun so FaR ?' y_correct = [3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 2 2 0 0 1 0] assert(isequal(count_alphabet(x),y_correct))

x = 'hAvE you Been haVInG fun so FaR ?' y_correct = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 2 2 0 0 1 0 f = [] letters = 'abcdefghijklmnopqrstuvwxyz' append = 3 f = 3 append = 1 f = 3 1 append = 0 f = 3 1 0 append = 0 f = 3 1 0 0 append = 3 f = 3 1 0 0 3 append = 2 f = 3 1 0 0 3 2 append = 1 f = 3 1 0 0 3 2 1 append = 2 f = 3 1 0 0 3 2 1 2 append = 1 f = 3 1 0 0 3 2 1 2 1 append = 0 f = 3 1 0 0 3 2 1 2 1 0 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 0 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 append = 3 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 append = 2 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 append = 1 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 append = 1 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 append = 2 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 2 append = 2 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 2 2 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 2 2 0 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 2 2 0 0 append = 1 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 2 2 0 0 1 append = 0 f = 3 1 0 0 3 2 1 2 1 0 0 0 0 3 2 0 0 1 1 0 2 2 0 0 1 0