A note on the course
Attribution
These discussions are heavily inspired/based on the book "Think Python: HOW TO THINK LIKE A COMPUTER SCIENTIST" by Allen B. Downey
Each discussion will be in an HTML page and/or a Jupyter notebook. I will convert all notebooks to HTML pages, but you will have the option on how to view each document.
- Python notebook - View the notebook (.ipynb) in VSC.
- HTML page - View the page (.html) in a browser of your choice
If you view the document using the html page, these will be static pages and often times cells will be shown empty. These empty cells of course will be your testing ground when using the notebook. Keep this in mind when viewing such pages then.
Python docs
The official Python docs should be in your bookmarks for a quick reference to a more in depth coverage of the language.
Do not overlook this source.
Python in "two"
First, before we begin to dive into the nitty gritty of the language, I would like to offer a quick overview of its features.
According to the official docs:
- Python is an interpreted, interactive, object-oriented programming language.
- It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes.
- It supports multiple programming paradigms beyond object-oriented programming, such as procedural and functional programming.
- Python combines remarkable power with very clear syntax.
- It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++.
- Is is also usable as an extension language for applications that need a programming interface.
- Finally, Python is portable: it runs on many Unix variants including Linux, and macOS, and on Windows.
Overview of common built-in types
- Numeric -
int
, float
, complex
- Sequence -
list
, tuple
, range
- Text Sequence -
str
- Binary Sequence -
bytes
, bytearray
- Set -
set
, frozenset
- Mapping -
dict
- Modules
- Classes
- Functions
- Methods
- Type Objects
- Null Object
- Boolean