>>    




Homework Assignment

CS 121 (CS1)

Homework 10   Due Wednesday, March 5, 2014
  1. Text questions

      Strings, Exercise 6

      Hints:

      • Use an accumulator that holds a string value

      • For each character in a given string, concatenate that character at the front of that accumulator.

      • To control your loop, you may either

        • use an index as a loop control variable, so that string[index] would give access to individual characters, and use the built-in function len() to determine how many times to repeat, OR

        • use the string itself as an iterator, as described in the reading.

  2. Recursive functions that return a number [hc]

      Recursion questions, 10 d

  3. Recursive functions that return a list [hc]

      Recursion questions, 11 a

  4. Image processing [hc]

      Image questions, 5 a, b

      Image questions, 6 a

  5. Reading

      Postponed