Question: Scala Programming Write a function named countVowels that inputs a String and outputs an Int which counts the number of occurrences of a vowel in

Scala Programming

Write a function named countVowels that inputs a String and outputs an Int which counts the number of occurrences of a vowel in a given string.

Vowels are a, e, i, o, u.

Example

Input: "aaatchoU" Output: 5.

Capital letters of vowels should also count as a vowel.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!