Course Home | Assignments | Computing Resources | Lab Hours/Tutoring | Python | Schedule | Submit

Saint Louis University

Computer Science 1300
Introduction to Object-Oriented Programming

Michael Goldwasser

Spring 2017

Dept. of Math & Computer Science

Homework Assignment 11

Dictionaries

Contents:


Overview

Topic: Dictionaries
Related Reading: Chapter 12
Due: 11:00am, Friday, 28 April 2017

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


Problems to be Submitted (18 points)

  1. (6 points)

    Exericse 12.3

  2. (6 points)

    In class, we demonstrated use of the method dict.setdefault method. Demonstrate your understanding by giving a snippet of code with logic that is equivalent to the following:

    val = capital.setdefault('CA','Springfield')
    
    presuming that capital is a dictionary. You are not allowed to use the setdefault method in your answer.

  3. (6 points)

    Exericse 12.4


Extra Credit

  1. (2 points)

    Exercise 12.6


Michael Goldwasser
CSCI 1300, Spring 2017
Last modified: Monday, 12 April 2010
Course Home | Assignments | Computing Resources | Lab Hours/Tutoring | Python | Schedule | Submit