========================= Practice problems: Week 2 ========================= The purpose of these problems is to allow you to test you understanding of the material we have covered so far. It is intended to take an hour or so, assuming you have done the reading. To get started run ``git pull upstream master``, which will pick up a directory named ``pp2``. The problems are broken up into two parts: a set of "be-a-computer" warm-up exercises and a set of programming problems. You should do the warm-up exercises by hand. You can check your answer by running the Python program ``warmup.py`` in ``pp2``. We will be using a system named Kattis for the programming problem. Kattis is a website that allows students to submit solutions to programming problems, and have them evaluated automatically by running a series of test cases on the submitted solutions. You can find information about how to use Kattis `here `_. You can find the skeleton code needed for the programming problems in ``pp2``. Warm-up exercise #1: What is the output of the following code? .. literalinclude:: warmup.py :lines: 1-24 Warm-up exercise #2: What is the output of the following code? .. literalinclude:: warmup.py :lines: 28-38 Warm-up exercise #3: What is the output of the following code? .. literalinclude:: warmup.py :lines: 42-52 Programming problem #1: `Within range `_ Programming problem #2: `Count negative `_ Programming problem #3: `List negate `_ Here are a couple problems for those of you who like a challenge! Challenge exercise: What is the output of the following code? .. literalinclude:: warmup.py :lines: 56-67 Challenge programming problem: `A tricky problem `_