Homework  Assignment Number 8

Grading Criteria

  1. Does your programs work?
  2. Does it solve the problem?
  3. Do you use regular expressions?
  4. Is your code clearly written?
  5. Is it elegant or clever?
  6. Optionally, change rules to handle exceptions: coy → coyer, dicey → dicier, dopey → dopier

Note: You can ask any questions by email or in person and I will give you hints if you are having trouble.

What you Should remember:

  1. re.search(pattern,string)
  2. If a pattern is found, a match object will be returned.
  3. There are 3 slots of that object:
  4. You need to use the square brackets to indicate a list of possible letters.
  5. You need to use $ to represent the end of the word.
  6. You need to create new a new string by slicing and appending.