Cody

Problem 43132. Calculate vowel / consonant ratio of a string

Solution 1998563

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 )

Error in solution: Line: 7 Column: 47 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 7 Column: 47 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Suggested Problems

More from this Author1