I am having trouble trouble figuring out this problem any help would be appreciated.
The problem wants you to change english into pirate language. Using the string split and join methods.
This is what i have so far.
import copy
def wordReplace (wordText):
wordDict = { "hello" : "avast" , "excuse" : "arrr" , "sir,boy,man" : "matey" , "madam" : "proud beauty" ,"officer" : "foul blaggart" , "the" : " th'" , "my": "me" , "your" : "yer" , "is": "be" , "are" : "be" , "restroom" : "head" , "restaurant" : "galley" , "hotel" : "fleabag inn" , "booty" : "treasure" , "grog" : "drink" , "jack" : "flag"}
wordFile = (wordText)
for line in wordFile:
wordDict wordText.replace(wordText,wordDict[wordText])
return wordText