Strings
Students will...
- be able to describe the difference between a simple data type and a collection (or composite) data type.
- be able to use the concatenation operator + and indexing/subscripting operator [ ] on strings.
- know that strings are objects and have many useful predefined methods on them.
- be able to write code using string methods strip(), count(), find(), etc.
- know in their heart-of-hearts that strings are immutable and what the implications of this are.
- be able to slice a sequence.
- understand string comparison (especially
==
).
- be able to converse wisely about the difference between an index-based loop and an item-based loop.
- understand the common pattern
range(len(someList))
.
- be able to write code to traverse a string using a for loop or while loop.
- 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.