contestada

write a function called which_vowels_present that takes a single string parameter. complete the function to return a list of strings indicating which vowels (a, e, i, o, and u) are present in the provided string. the case of the vowels in the original string doesn't matter, but they should be lowercase when returned as part of the list. the order of the vowels in the list doesn't matter. for example, if the provided string was 'all good people.', your code could return ['a', 'e', 'o']. it could also return ['e', 'o', 'a']. one way to implement this would be to use the filter pattern starting with the list of all vowels.

Respuesta :

The function which_vowels_present will be implement using the Kotlin Programming language, also, a single for-loop is okay for the solution to this problem

//Here is the Algorithm for the problem

fun which_vowels_present(parameter: String) {

   for (c in parameter.toCharArray()) {

       when (c) {

           'a', 'e', 'i', 'o', 'u' -> print("$c")

       }

   }

}

Furthermore, to help us solve the problem, we took advantage of kotlin's in build string function that can convert a string array to Character array

Learn more:

https://brainly.com/question/14432459