Saint Louis University |
Computer Science 150
|
Dept. of Math & Computer Science |
Topic: Functions and Exceptions
Related Reading: Chapter 5.2-5.5
Due:
9:00am, Friday 26 February 2010
Please make sure you adhere to the policies on academic integrity.
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'.
Exercise 5.28 of the text
Exercise 5.30 of the text.
Note that the letters requiring use of the article
an in front of them are 'aefhilmnorsx'
Exercise 5.34 of the text
Note that the solution to the last homework contains code for related Exercise 5.23 that you may use. The point of this exercise is to have you do proper error checking of the parameters (see Chapter 5.5 for coverage of error checking and exceptions).
Exercise 5.26 of the text