Cody

Problem 44697. count upper and lower case characters

Solution 1988555

Submitted on 24 Oct 2019 by Nikolaos Nikolaou
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
str = 'This is a Test Case'; ans_corr = [3 12]; assert(isequal(counter_ul(str),ans_corr))

y = 3 12

2   Pass
str = 'RandoM'; ans_corr = [2 4]; assert(isequal(counter_ul(str),ans_corr))

y = 2 4

3   Pass
str = 'Hello World'; ans_corr = [2 8]; assert(isequal(counter_ul(str),ans_corr))

y = 2 8

4   Pass
str = 'HELLO WORLD'; ans_corr = [10 0]; assert(isequal(counter_ul(str),ans_corr))

y = 10 0

5   Pass
str = 'hello world'; ans_corr = [0 10]; assert(isequal(counter_ul(str),ans_corr))

y = 0 10

6   Pass
str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; ans_corr = [26 0]; assert(isequal(counter_ul(str),ans_corr))

y = 26 0

7   Pass
str = 'abcdefghijklmnopqrstuvwxyz'; ans_corr = [0 26]; assert(isequal(counter_ul(str),ans_corr))

y = 0 26

8   Pass
str = '42'; ans_corr = [0 0]; assert(isequal(counter_ul(str),ans_corr))

y = 0 0

9   Pass
str = 'Matlab'; ans_corr = [1 5]; assert(isequal(counter_ul(str),ans_corr))

y = 1 5