- Development Environment
-
- Use a unix command line interface (CLI) to manage files and
directories.
- Log-on to a remote server and move files between the remote and local
machine using
ssh and scp.
- Edit text files with vi.
- Python Environment
-
- Use the Python shell for interactive evaluation of Python expressions
and testing of Python syntax.
- Make Python scripts with a text editor and run them from a CLI or
IDE.
- Data Types, Statements, and Expressions
-
- Recognize values of type
int, float,
bool, str, list, tuple,
dict, and set.
- Create values of type
int, float,
bool, str, list, tuple,
dict, and set.
- Use
type(...) to determine the data type of a given
value.
- Use assignment statements to assign names (variables) to values.
- Describe what can appear on the left and right of an assignment
operators (
=) and what happens when and assignment statement
is executed.
- Use numeric operators
+, -, *,
/, //, **, and % to
form numeric expressions.
- Use the
+ operator to concatenate sequence types.
- Use the
input function to read user input.
- Use the
int(...) and float(...) type
conversion functions to convert strings into integers and floats.
- Use the
str(...) function to convert numeric and other
values to strings.
- Use the
list(...) and tuple(...) type
conversion functions to convert back and forth between lists and tuples.
- Define keyword and recognize keywords in Python.
- Create legal variable names and recognize illegal ones.
- Errors
-
- Recognize and differentiate among syntactic, semantic,
and runtime errors.
- Read and interpret stack traceback messages.
- Strings
-
- Create string literals with single, double, and triple quotes.
- Use the
len() function to return the length of a
string.
- Use the index operator (
[]) to return individual
characters from a string.
- Use the slice operator (
[:]) to extract a substring
from a string.
- Use the string
format method to dynamically create
strings.
- Use the
in operator to test whether a substring occurs
within a string.
- Use a
for loop to interate over the characters in a
string.
- Use the
strip(), lstrip(), and
rstrip() methods to remove leading and trailing whitespace
from strings.
- Use the
lower(), upper(), and
capitalize() methods to modify the case of letters in
strings.
- Use the
find(...) method to locate substrings in a
string.
- Use the
split() method to break a string into a list of
substrings.
- Lists and Tuples
-
- Use the
len() function to return the length of a
list or tuple.
- Use the index operator (
[]) to return individual
elements from a list or tuple.
- Use the slice operator (
[:]) to extract a subsequence
from a list or tuple.
- Use the
in operator to test for element membership in
list or tuple.
- Use the
append(...) method to add items to the end of a
list.
- Use the
insert(index, value) method to add items to a
desired location in a list.
- Use the
index(...) method to return the location of an
element in a list or tuple.
- Use a
for loop to interate over the elements in a list or
tuple.
- Dictionaries
-
- Describe the syntax for representing key-value pairs in a dictionary.
- Use the
d[key] = value syntax to add key-value pairs to
a dictionary.
- Use
d[key] syntax to return values from a dictionary
given a key.
- Use the
in operator to test if a dictionary has a given
key.
- Use a
for loop and a d.items() iterator to
access all the key-value pairs in a dictionary.
- Files
-
- Use the
open(...) function to open a file for reading,
writing, and appending.
- Use the
read() and readlines() methods to
read the data from a file.
- Use the
write(...) method to write data to a file.
- Functions
-
- Be able to write the syntax definition of a function.
- Use parameters as local variables in functions.
- Recognize the parameter / argument relationship as equivalent to the
name / value relationship in an assignment statement.
- Write functions which return values that depend on arguments.
- Classes and Objects
-
- Define and instantiate Python classes.
- Describe the relationship between a class and an instance
and the role of the
self parameter.
- Add data attributes and methods to classes.
- Use the
__init__(self) method to initialize instances.
- Software Development
-
- Use iterative development to create and test a program step-by-step.
- Use doctests to automate the testing of functions, modules, and
objects.
- Use test-driven development (TDD) to describe what working code
should do before you write it.