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

Saint Louis University

Computer Science 150
Introduction to Object-Oriented Programming

Michael Goldwasser

Spring 2013

Dept. of Math & Computer Science

Homework Assignment 05

Functions, Exceptions

Contents:


Overview

Topic: Functions, Exceptions
Related Reading: Chapter 5
Due: 1:10pm, Friday, 29 February 2013

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


Problems to be Submitted (20 points)

  1. (5 points)

    Write a function acronym(phrase) that accepts a string as a parameter, and returns a new string that includes the first letter of every word in the original phrase, all in uppercase. For example, a call to acronym('Laughing out loud') should return the string 'LOL'.

  2. (5 points)

    Exercise 5.23 on page 199 of the book.

  3. (5 points)

    Exercise 5.34 on page 200 of the book (that is, an error-checking version of Exercise 5.23 of page 199)

    You do not need to reimplement the main logic of the function. What we are interested in is seeing how you would perform the appropriate parameter checking.

  4. (5 points)

    Exercise 5.33 on page 199 of the book.


Extra Credit

  1. (2 points)

    Exercise 5.25 on page 199 of the book.


Michael Goldwasser
CSCI 150, Spring 2013
Last modified: Thursday, 21 February 2013
Course Home | Assignments | Computing Resources | Lab Hours/Tutoring | Python | Schedule | Submit