Week 3: Sept 11 - 17 ==================== Quiz 2 ~~~~~~ .. rubric:: Tuesday, September 12 * :download:`Sample Quiz 2 <../Quizzes/quiz2_sample.pdf>` What is covered: * ``for`` loops and ``while`` loops. * ``break`` and ``continue`` * The ``range()`` function. * Logical operators: ``not``, ``and``, ``or``. * Defining functions. Python ~~~~~~ * Documenting code: comments and docstrings * :doc:`List indexing and slicing ` * :doc:`Mutable and immutable objects ` * ``while`` loops * Fine-tuning loops: ``break`` and ``continue`` * :doc:`Functions: positional, keyword, and default arguments ` * :doc:`Plotting with Matplotlib ` * :doc:`List comprehensions ` Mathematics ~~~~~~~~~~~ * Sieve of Eratosthenes Week 3 notebook ~~~~~~~~~~~~~~~ - `View online <../_static/week3_in_class.html>`_ - `Download <../_static/week3_in_class.ipynb>`_ (after downloading put it in the directory where you keep your Jupyter notebooks).