Students will learn how indexing can be used to specify a specific character in a string based on location.
Students will be able to use indexing in order to find a specific character in a string.
Students will learn how slicing allows them to select multiple string values at once from a given string.
Students will be able to use slicing to select a chunk of values from a string.
In this lesson, students will look at the use of for loops with strings. Since both string indices and for loops index at zero, the len
value can be used to go through strings in a for loop. Indicies don’t need to be explicitly used. The syntax for character in my_string
can be used to go through a for loop one character at a time.
Students will be able to:
In this lesson, students will see how the in
keyword can be used in an if
statement to see if a particular letter or substring is in a string.
Students will be able to:
in
keyword to check if a character is in a stringIn this lesson, students will learn about string methods. Methods are basically functions that you call on objects and can be used to alter our strings in different ways.
Students will be able to:
In this lesson, students will learn about and practice using tuples. A tuple is a heterogenous, immutable data type that stores an ordered sequence of things that can be accessed using indices.
Students will be able to:
In this lesson, students will learn about their second data structure, lists. A list is a mutable, heterogeneous data type that stores an ordered sequence of things.
Students will be able to:
In this lesson, students will learn how lists can be iterated over in a similar way to strings.
Students will be able to:
Methods, in general, are like functions that can be called on objects. Students have seen previously how string methods are called on strings. In this lesson, students will learn about the various list methods that can be called on lists!
Students will be able to: