def vowel_consonant_pairs(w, max=None):
 m = 0
 for (i, ch) in enumerate(w):
  if (is_vowel(ch) and (i < (len(w) - 1)) and is_consonant(w[(i + 1)])):
   m += 1
   if (m == max):
    break
 return m

def vowel_consonant_pairs ( w , max = None ) : m = 0 for ( i , ch ) in enumerate ( w ) : if ( is_vowel ( ch ) and ( i < ( len ( w ) - 1 ) ) and is_consonant ( w [ ( i + 1 ) ] ) ) : m += 1 if ( m == max ) : break return m
returns the number of consecutive vowel-consonant pairs in the word .