Python
PY01 - Python Basic Syntax
Complexity
Junior
Timeframe
6h
Summary
You should understand all basic syntax features of Python.
Skill Breakdown
You should understand how to execute Python scripts and how to use the Python REPL.
You should understand the following things about variables and data types:
- declaring variables
- important primitive data types:
intfloatboolstr
You need to understand how to form expressions using operators and be familiar with the following operators:
- assignment operator
= - arithmetic operators
+,-,*,/,**,%,// - comparison operators
==,!=,<,<=,>,>= - logical operators
and,or,not - shorthand assignment operators
+=,-=,*=,/=,**=,%=,//= - string concatenation operator
+
You also need to know how to group expressions using parentheses. You should also be aware that working with floats can lead to precision problems.
You need to know how to use format strings.
You should understand the basic syntax behind arrays:
- constructing arrays
- accessing array elements
- changing array elements
- retrieving the length of an array
You should understand the following things about functions:
- function definitions
- function parameters
- the
returnkeyword - function calls
- positional and keyword arguments
You should understand the basic syntax behind objects and classes:
- creating a class
- constructing objects
- accessing object attributes
- writing and calling object methods
__str__and__repr__methods- object identity
- overriding object equality using
__eq__
You should understand the most important iterables:
- strings
- arrays
- dictionaries
- tuples
You should understand the if statement and know about the if, elif and else keywords.
You should understand the following loops:
forloopswhileloops
You should know how to raise errors using the raise statement and how to catch errors using the try...catch statement.
Required Resources
The Python Minibook:
- Fundamentals (opens in a new tab)
- Variables, Data Types and Operators (opens in a new tab)
- Functions (opens in a new tab)
- Classes (opens in a new tab)
- Iterables (opens in a new tab)
- Control Flow (opens in a new tab)
- Exceptions (opens in a new tab)
- The Project (opens in a new tab)
Optional Resources
Python Tutorial:
- Whetting Your Appetite (opens in a new tab)
- Using the Python Interpreter (opens in a new tab)
- An Informal Introduction to Python¶ (opens in a new tab)
- More Control Flow Tools (opens in a new tab)
- Data Structures (opens in a new tab)
- Errors and Exceptions (opens in a new tab)
- Classes (opens in a new tab)
PY02 - Python Input and Output
Complexity
Junior
Timeframe
3h
Summary
You should know how to deal with input and output in Python.
Skill Breakdown
You should know the most important strings methods:
loweruppersplitjoinstartswithendswith
You should understand escape characters and why they are needed.
You should know how to process user input using the input function.
You should know how to work with text files:
- the
openfunction - modes:
"r","w","a" - the
readandwritemethods - closing files
- using the
withstatement to simplify file processing
You should have a rough understanding of Unicode and encodings and be able to deal with encoding errors.
Required Resources
The Python Minibook:
Python Tutorial:
PY03 - Python Modules and Packages
Complexity
Junior
Timeframe
3h
Summary
You should be able to work with Python modules and packages.
Skill Breakdown
You should know how to write modules and how to import module functionality:
- the
importstatement - the
from...importstatement - aliasing using the
askeyword
You should know a few important built-in modules:
- the
mathmodule - the
randommodule - the
datetimemodule
You should know how to use the pip package manager to install third-party packages.
Required Resources
The Python Minibook:
Optional Resources
Python Tutorial: