question given a string consisting of english alphabets the task is to count the number of adjacent pairs of vowels for example input str abaebio output 2 a e and i o are the only valid pairs source a very common interview question time complexity the goal is to complete this question in on function to check whether a character is vowel or not function to find the number of adjacent vowel pairs driver code function to check whether a character is vowel or not function to find the number of adjacent vowel pairs driver code
def is_vowel(character):
    if character.lower() in ['a', 'e', 'i', 'o', 'u']: 
        return True
    else:  
        return False
  


def adjacent_pairs(string):
    string=string.lower()
    n=len(string)
    count = 0
    for i in range(0,n):
        if ((is_vowel(string[i]) and is_vowel(string[i + 1]))): 
            count += 1
    return count


string=input("enter string")
print (adjacent_pairs(string),"is the number of adjacent pairs of vowels")