PygLatin

The purpose of this lab was to write a python script that converts a word in English to pig latin. Pig latin is a game in which you take a word in English and remove the first letter, add it to the end of the word and attach ay after the words original first letter. This script takes in user input and returns the pig latin version of the word. The conditional statements if and else are used to ascertain if an appropriate input has been entered. It specifically makes sure that the input does not contain numbers and that the input contains at least one character. This was a pretty simple script, but it suggests more complicated and useful uses for python.

The conversion of a word from English to pig latin.

The conversion of a word from English to pig latin.

The python script prints 'empty' because the input contains numbers.

The python script prints ’empty’ because the input contains numbers.

The python code returns 'empty' because there is no input.

The python code returns ’empty’ because there is no input.

Python code including comments.

Python code including comments.