Pyg Latin

In “Pyg Latin” we worked to created a program that returned an altered output of the user’s raw input, or in simpler terms, what they entered from the keyboard. Most of the program required the use of conditionals such as if, elif, and else statements such that the program always returned an output depending on what the user entered.

 

pl2

pl3

pl4

pl5pl6

pl7

pl8

pl9

In the above screenshot you can see how variables such as “new_word” and “original” were used to define the user’s raw input and commands like “.lower” were used to alter the input to insure that it was always returned in a lowercase format.

pl10

pl11

In the top right corner of this final screenshot you can see how the final code returns the word entered in an altered format. Ultimately, taking the first letter and moving it to the end, and then adding “ay”.