DSW-Unit 2-Python
Summary
Crash course in Python for students that have some programming background (e.g. in Scratch, Snap, Processing, Java, Swift, etc.)
Topics
- Python Read/Eval/Print loop (REPL)
- Saving and running Python files in IDE provided
- Variables
- Types: int, float, bool, str, list, dict, object
- Functions
- Print vs. Return
- Control Flow: if, for, while
- Iterating over lists
- Using iteration to find counts, sums, min and max
- Working with Dictionaries
- Nested data structures (lists/dictionaries)
- Errors: syntax, run-time, logic
Learning Objectives
- The student will be able to do basic create, edit, run operations for a simple standalone 'hello world' style Python Program
- The student will be able to distinguish between syntax, run-time and logic errors
- Students will be able to fix simple syntax errors when given code that is almost correct
- Students will demonstrate that they can use the Python REPL to evaluate simple Python expressions
- Student will demonstrate that they can load function definitions into the Python environment and use the REPL to evaluate the function at various values
- Students will demonstrate that they can use unit testing and test-driven development to develop simple functions
- Students will demonstrate an understanding of print vs return
- Students will demonstrate that they understand how to trace programs that involve if/else control structures
- Students will demonstrate that they understand how to compute functions of lists using iteration (including min, max, sums and counts)
- Students will demonstrate that they understand how to work with simple dictionaries using keys, values, and iteration
- Students will demonstrate that they understand how to work with nested data structures involving lists and dictionaries