Programming in Python

UniCredit Course Agenda

Toggle Themes Toggle sub-themes

Python basics

Introduction: interpreters, distributions, IDEs.

  1. What's the use of Python?
  2. Python distributions.
  3. Install and setting up Python (on Windows, Mac, Linux).
  4. Write first Python script (using IDLE).
  5. Python IDEs and text editors.
  6. Write Python in VS Code

Core types: Strings and Numbers. Mutability. Variables.

  1. What's in a Python program?
  2. Numeric Types: integers, floating point numbers, and complex numbers.
  3. Python arithmetic.
  4. Strings. Common operations.
  5. Variables and naming conventions.
  6. How to comment our code?
  7. Exercises.

Basic IO and string formatting

  1. Basic IO.
  2. Formatted strings.

Data structures: Sequence Types (list, tuple)

  1. Lists
  2. Tuples
  3. Range Objects
  4. Strings as sequence

Data structures: Dictionaries and Sets

  1. Dictionaries
  2. Operations with Dictionaries
  3. Sets
  4. Set Operations

Booleans and Logical operations.Conditional Statements.

  1. Boolean type.
  2. Logical operators.
  3. if:elif:else statements.
  4. Exercises

Loops in Python: for, while, break, continue. Comprehensions

  1. while/do loops.
  2. for loops.
  3. break, continue.

Functions

  1. What are Functions?
  2. Function Definition
  3. Function Call
  4. Function Parameters (positional, keywords)
  5. Arguments unpacking - the ** operator
  6. Function Return Values
  7. Variables Scope

Exceptions: raising and handling

  1. What are Exceptions
  2. Exceptions Handling
  3. Handling different Exception Types
  4. Raising Exceptions

Basic OOP concepts in Python

  1. OOP - Main Concepts
  2. Classes and Objects in Python
  3. Attributes
  4. Class Constructor
  5. Magic (dunder) methods
  6. Encapsulation and Data Hiding
  7. Inspecting Classes and Objects.

Advanced OOP topics in Python

  1. Inheritance
  2. Method overriding
  3. Operator overloading

Iterators. Generators

  1. Iterators in Python
  2. iterables vs iterators
  3. Creating custom Iterator Types
  4. Generators in Python
  5. Creating custom Generator function
  6. Custom Generator vs Custom Iterator - example

Advanced Python

Functional topics: decorators, lambda/map/filter/reduce.

  1. decorators.
  2. lambda expressions.
  3. map/filter/reduce.

Organizing code: imports, modules, packages

  1. Creating a custom Python modules
  2. Import module
  3. Module alias
  4. Import object from module
  5. Where import looks for a module?
  6. Python's built-in and third-party modules
  7. Packages in Python
  8. Import-related module attributes (__name__, __file__)

Practicalities: virtualenv, linting, testing, documentation.

  1. PIP - the Python Package Manager
  2. Python Virtual Environments with Pipenv
  3. pipenv - example: simple_plot with matplotlib
  4. pipenv with VS Code

Notable Standard Library Modules

  1. sys - interface with Python Interpreter
  2. command line arguments
  3. other useful standard library modules

Date and Time support

  1. datetime.date
  2. datetime.time
  3. datetime.datetime
  4. datetime.timedelta

The Python process and OS services

  1. Execute external commands with Python

Using the file-system

  1. Directory Manipulations
  2. Files Manipulations

Various formats handling

  1. Parse JSON
  2. Parse CSV
  3. Parse XML

Unicode in Python

  1. Unicode Overview
  2. Python’s Unicode Support
  3. Encode-Decode Flow
  4. encode() and decode() functions

Reflection in Python

  1. dir(), type() and id() functions
  2. hasattr(), getattr() and setattr()
  3. isinstance() and issubclass() functions
  4. the inspect built-in module

Debugging Python applications

  1. How to Debug A Python Code?
  2. Overview of VSCode Debugger
  3. Debug menu
  4. Setup/Launch configurations
  5. Basic debug Commands (Start/Stop; Continue/Pause; Step Over/Into/Out; )
  6. Set Breakpoints
  7. Watch Variables

Regular Expressions in Python

  1. Regular Expressions Overview
  2. Regexes in Python - the re module

Python usage

Async programming: asyncio

  1. Asynchronous vs Synchronous vs Parallel Execution
  2. Basics of Python asyncio library
  3. An async consumer-producer example

Parallel programming: multithreading and multiprocessing

  1. Shape the concepts: multithreading, multiprocessing
  2. Example using the built-in multiprocessing module

Data science basics

  1. The data science process
  2. Pyhton in DataScience: numpy, pandas,
  3. Demo with Jupiter Notebook

Web Programming with Python

  1. An overview of Django -The (Python) web framework for perfectionists with deadlines.
  2. A demo example of ToDo List app with Django
  3. Web Scraping with Python - Live Demo

Databases: SQLalchemy

  1. What is an ORM?
  2. SQLAlchemy - the Python ORM
  3. Connect, Declare a Mapping,Create a Schema
  4. Demo example with SQLAlchemy and SQLite3

GUI: PyQt.

  1. PyQt - Overview
  2. Create a simple desctop GUI app with PyQt

Final Test

  1. Final Test