Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since:
Apr 2017
Last Sign in:
11 Weeks Ago, 6 Days Ago
Questions Answered:
4870
Tutorials Posted:
4863
Education
MBA IT, Mater in Science and Technology
Devry Jul-1996 - Jul-2000
Experience
Professor
Devry University Mar-2010 - Oct-2016
Category > ProgrammingPosted 12 May 2017My Price8.00
Write a program called syllables.py
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.