Week 1
- Python install
- VS Code install
- editing a
.py
Python program and executing it in the shell
- the REPL
- expressions and evaluating them
- mathematical operators and operator precedence
- using brackets
(
and )
to override operator precedence
- numeric vs character string data types
Week 2
- variables:
str
, int
, float
, bool
, inspect using type()
- conversion:
str()
, int()
, float()
- operators:
+
-
*
/
, **
, modulus %
- logical operators
<
>
==
>=
<=
!=
and
or
not
True
False
- operator precedence, using brackets
(
)
to save your sanity
import
statements—for example, from math import cos
print()
and formatted output using f-strings
- getting input from the user using
input()
- commenting code using
#
- reserved keywords in Python (e.g.
for
, return
, etc)
- operations on strings (strings are “objects” with “methods”)
- getting help using
help()
- conditionals using
if
elif
else
- the
list
variable type in Python
- loops using
while
and for
range()
& zero-based indexing in Python
Week 3
- in Python list variables are pointers
b = a
vs b = a.copy()
- NumPy arrays
- creating arrays
np.zeros()
and np.ones()
- shape of arrays using
np.shape()
- multidimensional arrays
- vectorized operations on arrays
- slicing & indexing into arrays
- writing functions in Python
- reading from files & writing to files