Cody

# Problem 43132. Calculate vowel / consonant ratio of a string

Solution 1998561

Submitted on 1 Nov 2019
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   Fail
x = 'This is a very good Day !' y_correct = 0.636363636363636 assert( abs(vcratio(x) - y_correct) < 1e-14 )

x = 'This is a very good Day !' y_correct = 0.6364 x = 'ThisisaverygoodDay' y1 = 1×5 cell array {'a'} {'e'} {'i'} {'o'} {'y'}

Output argument "y" (and maybe others) not assigned during call to "vcratio". Error in Test1 (line 3) assert( abs(vcratio(x) - y_correct) < 1e-14 )

2   Fail
x = 'Is Y0UR code sti1l hO1ding up 0k?' y_correct = 0.571428571428571 assert( abs(vcratio(x) - y_correct) < 1e-14 )

x = 'Is Y0UR code sti1l hO1ding up 0k?' y_correct = 0.5714 x = 'IsYURcodestilhOdingupk' y1 = 1×8 cell array {'I'} {'O'} {'U'} {'Y'} {'e'} {'i'} {'o'} {'u'}

Output argument "y" (and maybe others) not assigned during call to "vcratio". Error in Test2 (line 3) assert( abs(vcratio(x) - y_correct) < 1e-14 )

### Community Treasure Hunt

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

Start Hunting!