Starting Out with Programming Logic and Design (4th Edition)
Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 12, Problem 8PE

Pig Latin

Design a program that reads a sentence as input and converts each word to “Pig Latin.” In one version of Pig Latin you convert a word by removing the first letter, placing that letter at the end of the word, and then appending “ay” to the word. Here is an example:

English: I SLEPT MOST OF THE NIGHT

Pig Latin: IAY LEPTSAY OSTMAY FOAY HETAY IGHTNAY

Blurred answer
Students have asked these similar questions
Hawaiian Words CSC220  Must use Java Programming. Write a program that gives the pronunciation of a Hawaiian word. For instance, humuhumunukunukuapua’a phonetic guide would be Hoo-moo-hoo-moo-noo-koo-noo-koo-ah-poo-ah'ah The program should start by prompting for and reading in a Hawaiian word (or phrase) from the user. Check if the word is a valid by checking that it only has valid Hawaiian characters. If the word is not valid, warn the user about the offending character and prompt for a Hawaiian word again. Spaces are breaks for words and should be kept intact. The apostrophe is a hard stop andshould be kept in the word. Print the pronunciation of the word (or phrase). Print a dash after every sound as you see in the examples, so you get the syllables separated. Ask the user if they want to do another word. Valid responses are y, Y, n or N. If they want to play more, they can enter another word. If not, then the program ends. You won’t be able to just use the .replace() method.…
Singular to Plural. Create a program in Python that accepts a word in singular, and produces the corresponding plural. Use the following rules: a. If the word end in ‑s, -ss, -sh, -ch, -x, or –z, then add –es to the word. For example, the plural of tax is taxes b. If the word ends in -fe, then replace the ending with –ves. For example, the plural of wolf is wolves c. If the word ends in y and the previous letter is a vowel, then add –s to the word. For example, the plural of boy is boys d. If the word ends in y and the previous letter is a consonant, then change the –y ending with –ies. For example, the plural of city is cities e. If the word does not meet the criteria above, then add –s to it.
4. Word Separator:Write a program that accepts as input a sentence in which all of thewords 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. *python coding

Chapter 12 Solutions

Starting Out with Programming Logic and Design (4th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Program to find HCF & LCM of two numbers in C | #6 Coding Bytes; Author: FACE Prep;https://www.youtube.com/watch?v=mZA3cdalYN4;License: Standard YouTube License, CC-BY