Question: Python 3 please Exercise 2. Strings VCV (Sample Exam Question) A character in a string is said to be VCV if it is a consonant

Python 3 please
Exercise 2. Strings VCV (Sample Exam Question) A character in a string is said to be VCV if it is a consonant (i.e., non-vowel) and has both a vowel preceding it and a vowel following it in the string. Vowels are the characters 'a', 'e', 'T', 'o', 'u'. Write a program vcv.py that reads a string from the command line and finds and prints the vcv characters. Neither the first nor the last characters of a string can be vev. You may assume that all strings to be handled consist of lower case characters only. Your program must include: a function is_vowel(c) that returns a boolean indicating whether a character is a vowel or not a function vcv(st) that takes in a string and constructs and returns a string containing only the consonants that are surrounded by vowels. Your program should call these functions as needed and print the number of vev characters followed by those characters. For example, the string ecologist has 3 vcv characters because c, I, and g are surrounded by vowels. > python vcv.py ecologist 3 vcv characters: cig
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
