Write a program called syllablespy that reads a word and


Write a program called syllables.py that reads a word and prints the number of syllables in the word. For this program, assume the following rules are the only ones you need to determine the number of syllables (there are some special case words that do not follow these rules and we will NOT test for those):

Each vowel (a,e,i,o,u,y) counts as 1 syllable except as noted below

A sequence of adjacent vowels count as 1 syllable

An 'e' at the end of a word does not count

If the program determines there are no syllables, then set the count to 1 syllable

Here are some examples:

Please give me a word: harry

The word harry has 2 syllables.

Another example:

Please give me a word: hairy

The word hairy has 2 syllables.

Another example:

Please give me a word: hare

The word hare has 1 syllables.

And one more example:

Please give me a word: the

The word the has 1 syllables.

Solution Preview :

Prepared by a verified Expert
Business Management: Write a program called syllablespy that reads a word and
Reference No:- TGS01624186

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)