Cooperative Learning Question

On a piece of paper, write your NAME, SECTION and DATE.

Give the value of each expression below assuming that s = "ABC123$45". If a value is a string, show that it IS a string (quotes!) If it is not a string, state also what TYPE it is, as well as its value.

  1. s [0] = "A"
  2. s[-1] = "5"
  3. s[2:5] = "C12"
  4. s.find("23") = 4, int
  5. s.find("abc") = -1, int
  6. len(s) = 9, int
  7. "aaa" + s[2:3] = "aaaC"

Use your notes as desired.

Check with your neighbor to see that they all have the right answers.