Introductory Python

This is an introductory course of Python, as it was taught in Avans Hogeschool in the Netherlands.

This learning path covers all the topics usually taught during our 8 week Python course. Many modules can be re-arranged and re-organised based on the wishes of the instructor, however this is the suggested orientation. They are designed to be as modular as possible.

Licence: Creative Commons Attribution 4.0 International

Keywords: python, real-course, data-science

Authors: Helena Rasche, Bazante Sanders

Status: Active

Learning objectives:

Week 1: Python is a Calculator

  • Understand the fundamentals of object assignment and math in python and can write simple statements and execute calcualtions in order to be able to summarize the results of calculations and classify valid and invalid statements.
  • Translate some known math functions (e.g. euclidean distance, root algorithm) into python to transfer concepts from mathematics lessons directly into Python.
  • Understand the structure of a "function" in order to be able to construct their own functions and predict which functions will not work.

Week 2: Python is a Database

  • Explain key differences between integers and floating point numbers.
  • Explain key differences between numbers and character strings.
  • Use built-in functions to convert between integers, floating point numbers, and strings.
  • Explain why programs need collections of values.
  • Write programs that create flat lists, index them, slice them, and modify them through assignment and method calls.

Week 3: Python is a Computer

  • Write conditional statements including if, elif, and else branches.
  • Correctly evaluate expressions containing and and or.
  • Explain what for loops are normally used for.
  • Trace the execution of a simple (unnested) loop and correctly state the values of variables in each iteration.
  • Write for loops that use the Accumulator pattern to aggregate values.

Week 4: Python is a Programming Language

  • catch an exception
  • raise your own exception
  • Read data from a file
  • Write new data to a file
  • Use with to ensure the file is closed properly.
  • Use the CSV module to parse comma and tab separated datasets.

Week 5: Recap

  • Recap all previous modules.
  • Use exercises to ensure that all previous knowledge is sufficiently covered.

Week 6: Python is a Command Line Interface

  • Use glob to collect a list of files
  • Learn about the potential pitfalls of glob
  • Learn how sys.argv works
  • Write a simple command line program that sums some numbers
  • Use argparse to make it nicer.

Week 7: Python is a Workflow Engine

  • Run a command in a subprocess.
  • Learn about check_call and check_output and when to use each of these.
  • Read it's output.
  • Set up a Python virtual environment for our software project using venv and pip.
  • Run our software from the command line.
  • Set up a Conda environment for our software project using conda.
  • Run our software from the command line.

1

Week 1: Python is a Calculator

• beginner 2 materials

Python can work a lot like a desktop calculator! A lot of mathematical expressions one is used to from maths classes are the same or very similar in Python. Functional notation is also introduced.

Time estimation: 1 hour

2

Week 2: Python is a Database

• beginner 2 materials
3

Week 3: Python is a Computer

• beginner 2 materials

Once you’ve covered basic datatypes, let’s do interesting things with Python like Loops! And Flow Control! Python lets you automate calculations and tasks and we’ll learn about that building block this week.

Time estimation: 1 hour 20 minutes

4

Week 4: Python is a Programming Language

• beginner 2 materials

Now that we’ve covered 90% of what you will write when you write a programming language, let’s look at the last 10%, reading and writing files and handling exceptional circumstances.

Time estimation: 1 hour 50 minutes

5

Week 5: Recap

• beginner 1 material

You’re now a Python Programmer! This week we’ll go over everything you learned and work on some exercises that require putting together all of your new skills.

Time estimation: 1 hour 30 minutes

6

Week 6: Python is a Command Line Interface

•• intermediate 2 materials
8

Week 8: Review Period

0 materials

This course is an extremely fast 8 weeks, so this last week is spent on helping students debug problems in-person


Activity log