Saint Louis University |
Computer Science 1300
|
Computer Science Department |
Please make sure you adhere to the policies on academic integrity.
Lists support a method to count the number of times that a specified value appears in a list. Show that you can compute such a count without relying upon that method. Specifically, assume that you have a list named collection and a target value. You are to write a code fragment that computes the number of times that value appears in the given collection.
Assuming that words is a list of strings. Write a code fragment that computes a new list named palindromes that contains all words having length five or greater that are spelled the same backward and forward (e.g., 'kayak').