Assignment#4: PygLatin

The lesson Pyglatin lesson shows how the “raw_input” function to create a piglatin translator.  Picture#1 shows how the “raw_input” function can be used to allow users to enter a name.

Picture#2 shows how to make sure the user inputs a word. The if statement on line 6 makes sure a user inputs a word and else statement on lines 8-9 informs the user if its not a word.

pyglatin1pyglatin2

Picture#3 just adds another condition(something for the program to take into consideration) “is.alpha()” to make sure the reader must enter letters.

In picture#4  adds a function called “new_word” which allows the program to take a slice of a string.

capture3capture5

Picture#5 shows a test to see if the code functions properly which can be check in the console(box in the upper right).

capture6