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
Want to see the full answer?
Check out a sample textbook solutionChapter 12 Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Starting Out with C++: Early Objects (9th Edition)
SURVEY OF OPERATING SYSTEMS
Starting Out with Python (4th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Introduction To Programming Using Visual Basic (11th Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
- French Articles: French country names are feminine when they end with the letter e, masculine otherwise, except for the following which are masculine even though they end with e: le Belize le Cambodge le Mexique le Mozambique le Zaïre le Zimbabwe Write a program that reads the French name of a country and adds the article: le for masculine or la for feminine, such as le Canada or la Belgique. However, if the country name starts with a vowel, use l’; for example, l’Afghanistan. For the following plural country names, use les: les Etats-Unis les Pays-Basarrow_forwardQustion number 2 please, in paython language.arrow_forwardJava - Name Formatarrow_forward
- Directions: Code in Python and Code in Java/C++arrow_forwardLab 7 Pre-Lab In Java Write an algorithm that gets student exam scores from the user. Each exam score will be an integer in the range 0 to 100. Input will end when the user enters -1 as the input value. After all scores have been read, display the number of students who took the exam, the minimum score, the maximum score, the average score, and the number of As where an A is a score in the range 90-100. Make sure your average a decimal point. Only count A’s, not other grades. Note that you do not need to do any error checking on the input for this problem. This should be done as a standard sentinel-controlled while loop.arrow_forwardJava language kindly simulate it on netbeans Thanksarrow_forward
- IN C LANGUAGE CODE:Write a code snippet that can arrange the alphabets of a name entered by user in alternate cases.Note: Ignore white spaces. Input String:Timothy Olyphant Output String :TiMoThY OLyPhAnT Input String: Olga Kurylenko Output string: OlGa KuRyLeNkOarrow_forward1. Write a program that lets the user guess whether a randomly generated integer would be even or odd. The program randomly generates an integer and divides it by 2. The integer is even if the remainder is 0, otherwise odd. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.arrow_forwardLab Write a complete program that: 1. Prompts the user to enter an integer and reads in an integer number from the keyboard. 2. Prompts the user to enter a second integer and reads in a second integer number from the keyboard. Adds the integer from (1) to the integer from (2) 3. 4. Subtracts the integer from (2) from the integer from (1) 5. Multiplies the integer from (1) to the integer from (2). 6. Divides the integer from (1) by the integer from (2) 7. Modulus the integer from (1) by the integer from (2) 8. Prompts the user to enter a double and reads in a double number from the keyboard. 9. Prompts the user to enter a second double and reads in a second double number from the keyboard. 10. Divides the double from (8) by the double from (9) 11. Writes the answers from (3)-(7) and (10) out to the display The user should be prompted to enter the input values and the result of the arithmetic should be output. Example Output An example of an interaction with your program is shown below,…arrow_forward
- Anagram words Write a C code that asks users to enter two words, one after the other and checks if these words are anagrams (permutations of the same letters). For instance, the words “smartest” and “mattress” are anagrams. Examplea Run 1: Please enter first word: lookplease enter the second word: coolSorry! “cool” and “look” are not anagrams. Run 2: Please enter first word: masters please enter the second word: smartes Yes! “masters” and “smartes” are anagrams. Hint: If you sort the two words that are anagrams, they will become identical! For instance, “smartest” and “masters” both sort to “aemrsstt” You can use all functions in <string.h> Sorting a string is exactly similar to sorting an array. You just need to know the length of the string and make sure you do not touch the terminating null.arrow_forwardIn what ways does a String vary from a basic data type (such as int, double, or boolean)?arrow_forwardJava code screenshot and code is necessaryarrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT