Exercises

  1. 1.1 (IPython Session) Using the techniques you learned in Section 1.10.1, execute the following expressions. Which, if any, produce a runtime error?

    1. 10 / 3

    2. 10 // 3

    3. 10 / 0

    4. 10 // 0

    5. 0 / 10

    6. 0 // 10

  2. 1.2 (IPython Session) Using the techniques you learned in Section 1.10.1, execute the following expressions. Which, if any, produce a runtime error?

    1. 10 / 3 + 7

    2. 10 // 3 + 7

    3. 10 / (3 + 7)

    4. 10 / 3 - 3

    5. 10 / (3 - 3)

    6. 10 // (3 - 3)

  3. 1.3 (Creating a Jupyter Notebook) Using the techniques you learned in Section 1.10.3, create a Jupyter Notebook containing cells for the previous exercise’s expressions and execute those expressions.

  4. 1.4 (Computer Organization) Fill in the blanks in each of the following statements:

    1. The logical unit that ...

Get Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.