''' Purpose: translate user text to English ''' # get access to url support import url # CS 1112 translation dictionary -- entries are of form: word,translation BABEL_FISH_URL = "http://www.cs.virginia.edu/~cs1112/words/babelfish" # get contents of babel fish url as a dictionary babelfish_dictionary = ... # get the user text to be translated reply = input( "Enter phrase to be translated: " ) # convert reply into a list of words words_to_be_translated = ... # initialize translation accumulator translation = ... # process the words to be translated one by one. each word will contribute to # the accumulation for word in ... : # see if word is in the dictionary, that will determine our translation action ... # print translation print( translation )