Strings


Students will...

  1. be able to describe the difference between a simple data type and a collection (or composite) data type.
  2. be able to use the concatenation operator + and indexing/subscripting operator [ ] on strings.
  3. know that strings are objects and have many useful predefined methods on them.
  4. be able to write code using string methods strip(), count(), find(), etc.
  5. know in their heart-of-hearts that strings are immutable and what the implications of this are.
  6. be able to slice a sequence.
  7. understand string comparison (especially ==).
  8. be able to converse wisely about the difference between an index-based loop and an item-based loop.
  9. understand the common pattern range(len(someList)).
  10. be able to write code to traverse a string using a for loop or while loop.
  11. be able to write code to define optional parameters with default values in a function definition, and call the function multiple ways, providing some or all of the optional parameters with values.