Question: In this problem, you should write one function namedcount_vowels. This function should have three parameters. The first is a string of text, the second and

In this problem, you should write one function namedcount_vowels. This function should have three parameters. The first is a string of text, the second and third should be integers, which I will refer to as A and B. The function should count how many vowels (a, e, i, o, u) exist in the first parameter, between the indexes A and B (inclusive on both ends). The function should return this count. Shown below are a few examples:

  • count_vowels('one fish two fish', 2, 10)should return2
  • count_vowels('kiwis and oranges are good', 10, 25)should return7
  • count_vowels('aeiouaeiouaeiou', 5, 12)should return8

Make sure to include only the one function in your file. The gradescope tests will call the functions to test them. Name the programprep22.py. Make sure that gradescope gives you the points for passing the test case.

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 Mathematics Questions!