Programming Homework Help

COSC 1436 Houston Community Word Separator in a Pig Latin Python Program

 

1. Word Separator

Write a program that accepts as input a sentence in which all of the words are run together
but the first character of each word is uppercase. Convert the sentence to a string in which
the words are separated by spaces and only the first word starts with an uppercase letter.
For example the string “StopAndSmellTheRoses.” would be converted to “Stop and smell
the roses.”

2. Pig Latin
Write a program that accepts a sentence as input and converts each word to “Pig Latin.” In
one version, to convert a word to Pig Latin you remove the first letter and place that letter
at the end of the word. Then you append the string “ay” to the word. Here is an example:
English: I SLEPT MOST OF THE NIGHT
Pig Latin: IAY LEPTSAY OSTMAY FOAY HETAY IGHTNAY

3. Vowels and Consonants
Write a program with a function that accepts a string as an argument and returns the
number of vowels that the string contains. The application should have another function that accepts a string as an argument and returns the number of consonants that the string
contains. The application should let the user enter a string and should display the number
of vowels and the number of consonants it contains.