Just 2 Code needed

profileao36ggx

Requirements

I am providing a text file containing 58,112 words. You can download using the link: words.txt using the right-click "Save Link As". Place this file into the directory where you will have your pa05.py program. This way your code can easily find the text file with no extra work on your end.

  1. Write a function named getListContain(s,ifile,ofile) function that takes the string s (not just a single character) as the input and extracts all words that contain that string and writes them into a new file "ofile" in the same order. Run this program with different inputs, making sure that it works.
  2. Write a function named getListCount(n,ifile,ofile) function that takes the positive integer (1,2,3,..) and extracts all words that has exactly n letters, abd writes them into a new file "ofile" in the same order. Run this program with different inputs, making sure that it works. 
    • 11 years ago
    • 5
    Answer(0)
    Bids(0)