3E PROGRAMSExcellence (6 points): Complete PigLatin, InsidesOut, and PigLatin2.0 by within 50 hours. All standards are demonstrated.
Advanced (5 points): Complete PigLatin and InsidesOut within 50 hours, and have PigLatin2 completed by the end of Cycle 3. All coding standards are demonstrated. Proficient (4 points): Complete PigLatin and InsidesOut by the end of Cycle 3. All coding standards are demonstrated throughout all programs. Basic (3 points): Complete PigLatin by the end of Cycle 3, and have InsidesOut finished but not functioning. Below Basic (2 points): Complete PigLatin by the end of Cycle 3. |
|
PigLatin
Write a program that reads in a single word of any length that begins with a single consonant or single vowel and converts it to Pig Latin. The rules of Pig Latin conversion are as follows:
TEST DATA:
hungry = ungry-hay
ewok = ewok-way
doodle = oodle-day
noise = oise-nay
angry = angry-way
Write a program that reads in a single word of any length that begins with a single consonant or single vowel and converts it to Pig Latin. The rules of Pig Latin conversion are as follows:
- If a word begins with a single consonant, then that consonant is removed from the word and moved into a hyphenated suffix '-ay' between the hyphen and a.
- If a word begins with a single vowel, then the word simply is given the suffix -way.
TEST DATA:
hungry = ungry-hay
ewok = ewok-way
doodle = oodle-day
noise = oise-nay
angry = angry-way
InsidesOut
Ask the user to enter a string that has a number of characters that is a multiple of 4. The program should disallow for any entries that are not multiples of four; the program would just end if PIGGY or COMPUTERS were entered.
Break the string into fourths. Suppose we call these quarters A, B, C, and D. Create a new string in the order B, A, D, C. Print the original string and the new string to the screen.
TEST DATA:
Input: MR.KINDT
Output: MR.KINDT becomes .KMRDTIN
Input: ELIZABETHTOWNAHS
Output:ABETELIZNAHSHTOW
Ask the user to enter a string that has a number of characters that is a multiple of 4. The program should disallow for any entries that are not multiples of four; the program would just end if PIGGY or COMPUTERS were entered.
Break the string into fourths. Suppose we call these quarters A, B, C, and D. Create a new string in the order B, A, D, C. Print the original string and the new string to the screen.
TEST DATA:
Input: MR.KINDT
Output: MR.KINDT becomes .KMRDTIN
Input: ELIZABETHTOWNAHS
Output:ABETELIZNAHSHTOW
PigLatin2
Pig Latin becomes more complex due to consonant clusters, such as sh-, spl-, or br-, that begin a word. Adapt your original PigLatin to make version 2.0 that employs the following rule for consonant clusters. Note: Consonant clusters are two or three letters, but never more.
TEST DATA:
spleen = een=splay
shoddy = oddy-shay
broken = oken-bray
twisted = isted-tway
school = ool-schay
ALSO--make sure all the tests from PigLatin (above) work.
Pig Latin becomes more complex due to consonant clusters, such as sh-, spl-, or br-, that begin a word. Adapt your original PigLatin to make version 2.0 that employs the following rule for consonant clusters. Note: Consonant clusters are two or three letters, but never more.
- If a word begins with more than one consonant, move all of those consonants to the hyphenated suffix '-ay' between the hyphen and 'a'.
TEST DATA:
spleen = een=splay
shoddy = oddy-shay
broken = oken-bray
twisted = isted-tway
school = ool-schay
ALSO--make sure all the tests from PigLatin (above) work.
ABC: VowelShifter
Bloomsburg 2018, Problem #2. Can you hack it?
Bloomsburg 2018, Problem #2. Can you hack it?