Intro to Python and TDD with Pytest
What are we trying to accomplish?
By the end of this lecture you'll learn how to utilize Python's elegant syntax and rich ecosystem to solve functional algorithms while exercising your critical thinking and problem-solving abilities. Additionally, you'll learn how to utilize the pytest testing framework to explore and develop your skills with Test Driven Development.
Lectures & Assignment
- Lecture - Intro to Python
- Assignment - 99 Bottles in Python
- Assignment - Factorial in Python
- Assignment - Fibonacci in Python
- Lecture - TDD with Pytest
- Assignment - Test my Calculator
- Assignment - Roman Numerals in Python
- Assignment - Linear Search in Python
Stuck? Have a code error? Use the "4 Before Me" debugging checklist to help you solve it!
Terminal Learning Objectives
- Python Syntax, Variable types, control flow (conditional logic, for/while loops)
- Python Built-in Data Structures - lists, tuples, dictionaries.
- Python Built-in methods for strings, lists, dicts, etc.
- Understand how to find an item in a list or dictionary
- Understand Try-Except error handling
- Understand files in python. (relative vs. absolute paths)
- Test Driven Development with Pytest
- Pytest syntax, common errors, capabilities
- Monkeypatch
- capsys
Enabling learning objectives
- Writing Tests with Pytest
- Understand Test Driven Development
- Understand switch cases
- Understand lambda functions