Course Home | Class Schedule | Moodle CMS | Git Submission | Perusall | Tutoring

Saint Louis University

Computer Science 1300
Introduction to Object-Oriented Programming

Michael Goldwasser

Spring 2020

Computer Science Department

Homework Assignment 01

Please make sure you adhere to the policies on academic integrity.


  1. Give the type and value of each of the following Python3 expressions:
    1. 23 + 8
    2. 3 - 8
    3. 17 / 5
    4. 3 * '12'
    5. 4 * 3 ** 2 + 1


  2. Draw the evaluation tree corresponding to the Python3 expression
    4 * 3 ** 2 + 1


  3. Give a Python expression corresponding to the following mathematical expression

    $$ \frac{28.5 \ \cdot\ 3^3 - 1500}{11^2 + 37.3} $$

  4. Using the diagram style of Section 1.4, draw the resulting state at the end of the following interaction

    >>> x = 5
    >>> y = x + 3
    >>> x = 2 * y
    >>> y = x + 3

Michael Goldwasser
CSCI 1300, Spring 2020
Last modified: Sunday, 22 December 2019
Course Home | Class Schedule | Moodle CMS | Git Submission | Perusall | Tutoring