Cody

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

Solution 1998565

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

Error using regexprep Not enough input arguments. Error in vcratio (line 7) y3 = regexprep(x,strcat('[',[y1{:}],']','')) 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

Error using regexprep Not enough input arguments. Error in vcratio (line 7) y3 = regexprep(x,strcat('[',[y1{:}],']','')) Error in Test2 (line 3) assert( abs(vcratio(x) - y_correct) < 1e-14 )