Back to Module 1: Running Code

Arithmetic Exercise

Textbook chapters 1, 2

Write (on paper) each of the following expressions and what you think they evaluate to. The point isn't to magically produce the answer, it is to think about what reasonable, consistent, justifiable answers there are.

Only after you have written down your ideas for all of them, fire up Python and find out what they actually evaluate to. Draw a line and write those answers on the right side of the paper.

Bring the paper to class, ready to discuss what you found out. You are welcome to look things up once you've done the first two steps above.


  1. 4 + 3 * 2

  2. (4 - 7) / 2

  3. 18 // 5

  4. 9 % 2

  5. 9 % 5

  6. 9 % 12

  7. 13 // 4