Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.7 KB

hw02.md

File metadata and controls

58 lines (38 loc) · 1.7 KB

Homework 2

  1. Solve Exercises 1, 2, 3(a) 5, 6, 7, 8, and 9(a) in Jarvis and Shier.

    Due on November 12: Submit your answers at end of the class.

  2. Solve Exercises 3, 9, and 11 in Jarvis and Shier.

    Due on November 11: Push your IPython notebook to your GitHub repository.

    1. Create a new repository.

    2. Make a clone with, e.g., SourceTree.

    3. Download JarvisShier_ex.ipynb and save it in the folder created above. Simulation part added (11/10)

    4. Open the downloaded file with IPython, and execute the commands and write your own code in blank cells.

    5. Commit and push the file.

    6. Edit the file "README.md" in your repository (create a file if not existing) to make a link to your notebook through nbviewer:

      Add to README.md the following line:

      [My notebook](http://nbviewer.ipython.org/github/USER/REPO/blob/master/FILENAME.ipynb)
      

      where you change

      • USER to your user name,
      • REPO to your repository name, and
      • FILENAME to your file name.

      Here is an example of the outcome.

    Suggested solutions (11/12)

  3. Solve Exercises 10 in Jarvis and Shier.

    Due on November 11: Push your Python script file to your GitHub repository.

    The algorithm is implemented for example in fractions.gcd, which you can find by running the following on IPython notebook:

    import fractions
    fractions.gcd??

    (11/12)