Modified Piggy

$25.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (2 votes)

# Week-Four-Assignments
Assignments for week 4 lab

## Modified Piggy

In this lab, you are going to modify the Pig Latin converter so that it correctly interprets a word. You are then going to make this converter into a function that you can use in the next lab.

## Pigify Gettysburg

###Write a program that performs the following.
* Open the file *getty.txt* for reading.
* Open a new file *piggy.txt* for writing.
* Read the getty.txt file into a string.
* Strip out bad characters (, – .).
* Split the string into a list of words.
* Create a new empty string.
* Loop through the words, pigifying each one.
* Add the pigified word (and a space) to the new string.
* Write the new string to piggy.txt.
* close the files.