Purchase Solution

Webpage - Pig Latin

Not what you're looking for?

Ask Custom Question

Technically speaking, the Pig Latin rules that we have established apply only to words, not phrases. However, your current piglatin.html page does nothing to prevent users from entering a string containing spaces. Thus, a user could enter "foo bar" in the text box and be told that the Pig Latin translation is "oo barfay".

Modify your PigLatin function so that, before the string is translated, the function checks whether the input is a single word (i.e. whether it contains any spaces). If there are spaces in the input, the function should return the string "ILLEGAL INPUT".

Attachments
Purchase this Solution

Solution Summary

This solution involves writing a function that will translate words to Pig Latin.

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Javscript Basics

Quiz on basics of javascript programming language.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.