writing functions using dictionaries file i o and modules

6 functions. Has to be done by Nov 24th 13:00 P.M EST. All the necessary files for testing your project have been zipped in one file. It is recommended that you test each function independently because some tests might be computationally intensive.

Restrictions

  • There is exactly one import statement allowed in this project: import random
  • o You are not allowed to import anything else.

    o You can only use randint() choice() and seed() from the random library

  • You are not allowed to use classes, exceptions, the with statement, and list/dictionary comprehensions.
  • From the built-in functions, you are allowed to use:
  • o range(), len(), sorted(), int(), sum(), list(), float()

  • From list methods, you are allowed to use:
  • o append(), insert(), copy(), remove(), pop(), index()

  • From the dictionary methods, you are allowed to us:
  • o get(), values(), keys(), items(), update()

  • For the file/string methods, you are allowed to use:
  • o open(), strip(), split(), join()

    o read(), readline(), readlines(), write(), writelines()

  • You may not make more than one pass of a file when reading it. Do not circumvent this rule by reading in the file as one entity (one string, a list, etc.), and then performing multiple passes on that.