25. Files and Representations of Data:  Homework

Last revision:  April 15, 1998

Author: YourNameGoesHere

1  Storing the Numbers from 1 to 100

Write a function with one argument "file" which writes the Integers from 1 to 100 to file "file".

2  Strings Into Characters

Write a function of one argument "s", a String, which writes the string "s" to some file and then reads the string that file back in as a list of single characters.  This operation thus mimics Characters[].  Pay attention to the methods Mathematica has for reading in data from a file.

3  Our Very Own Copy

Write a function of two arguments "file1" and "file2" which reads each line from file "file1" and writes it to file "file2".  If this works, you should be able to copy your notebooks using the command.  

Notes: 
•  Be careful to save copies of any work you might damage!
•  If you are copying notebooks, note that the "!!" command senses that a file is a notebook and opens a new window.
•  Don't use CopyFile[].