Who designed Python?
Guido van Rossum
When did Python first appear?
1991
Computer program
Consists of a collection of commands, usually stored in a file (or set of files).
Rather than typing out the commands each time we want to execute them, we simply run the program.
Contrast imperative vs declarative programming
With imperative programming, you tell the compiler what to happen step-by-step.
With declarative programming, you write code that describes what you want, but not necessarily how to get it.
E.g.:
Declarative: “Give us every odd number in this collection”
Imperative: “Step through this collection. Check this item. If item % 2 == 0, add it to the result collection”.
6 Strengths of Python as a programming language
5 Weaknesses of Python as a programming language
Intergrated Development Environment
A software tool that is designed to support the whole process of creating programs, including editing, running, and debugging, and also organising and combining different program components.
2 Advantages of server-based implementation of a programming interface
Literate programming
The purpose, functionality and logic of a program are explained by means of natural language descriptions that are included with the actual source code of the program.
In other words, the executable code of a program is shown with documentation of what it is and how it works.
6 General properties and capabilities of notebook programming environments
5 Advantages of notebook-style programming
3 Disadvantages of notebook programming
Variables
Words in a program’s code that are used to stand in place of some value.
They may be thought of as referring to or naming their value.
Rules for variable names in Python
A variable name can consist of any sequence of letters and digits and can also contain the underscore symbol.
Even though variable names can contain digits, the first symbol cannot be a digit.
Operator
This term typically refers to the most basic types of manipulation, such as mathematical operations.
These are often represented by specific symbols, such as +, *, -, …
Method
The term method is used in object-oriented programming languages (including Python) to describe a function that is intimately connected with some type of data that has been defined as a class.
.(, …, )
‘procedure’ vs ‘function’
Historically, the word ‘function’ was typically used for an operation that returns a result, whereas ‘procedure’ meant an operation that produced some effect without returning a value.
4 Primitive types in Python
int
Integer valued number of unspecified length
float
A floating point number, which is an approximate representation of a real number.
complex
Python can handle complex numbers, which consist of a real and imaginary part.
8 Mathematical operations in Python
6 Comparison operators in Python
Modules vs Packages in Python
The term module technically refers to any code that is stored within a single file.
The term is particularly used when talking about the standard modules that are provided with Python or distributed within some package.
A package is just a collection of modules that are grouped and distributed together.