Python Primer
This primer comprises a sequence of instructional videos and Python notebooks covering how to install Python and several integrated development environments and an introductory guide to the Python language.
The table of contents below provides links to open the notebooks in Google Colab (from which they can also be downloaded), and to open the videos in the TAMIDS YouTube channel.
This primer was created by Matt Hielsberg with support from Texas A&M Institute of Data Science and the Texas A&M University Department of Mathematics.
Quick Start Guide for Learning Python Without Any Software Installation
- Obtain a Google account if you don’t already have one; this is needed to run Google Colab. When opening each notebook, you may need to agree to run the content when prompted by Colab.
- Skip down below to the Python Language Guide and start at Chapter 4
Learning Objectives For This Python Primer
- Learn about objects, classes and inheritance, including multiple inheritance.
- Learn where to find tutorials, documentation on Python as well as community developed packages.
- Use comments and learn how to incorporate them into the help system.
- Write and evaluate expressions using variable names.
- Use basic data structures including strings, lists, tuples, sets, and dictionaries, among others.
- Understand and use various control flow mechanisms, including looping, functions and exceptions.
- Write functions, understand return values and argument lists, including positional and keyword arguments.
- Understand binding and copies, as well as interning/small integer caching.
- Learn about name resolution, blocks, scope and name spaces.
- Find and use modules and packages.
Chapter 1
Background and Installation
Python Systems and Installation GuideSection 1.1
Background and Installation
Chapter 2
Getting Started with Python Interpreter
Python Systems and Installation GuideSection 2.1
Interpreter
Section 2.2
Scripts
Section 2.3
Guidelines
Chapter 3
Getting Started with Jupyter
Python Systems and Installation GuideSection 3.1
Colab
Section 3.2
Jupyter
Chapter 4
Introduction
Python Language GuideSection 4.1
Help, Docstrings, & Comments
Section 4.2
Calculator
Section 4.3
Comparison, Logical and Bitwise Operators
Section 4.4
Variables
Section 4.5
Strings
Section 4.5
Lists
Chapter 5
Control Flow
Python Language GuideSection 5.1
Blocks, Indention
Section 5.2
Looping Techniques and Conditions
Section 5.3
Functions
Section 5.4
Exceptions
Section 5.5
Short-Circuit Evaluation
Chapter 6
Data Structures
Python Language GuideSection 6.1
Lists Revisited
Section 6.2
Stacks and Queues
Section 6.3
Tuples
Section 6.4
Sets
Section 6.5
Dictionaries
Chapter 7
Names
Python Language GuideSection 7.1
Objects
Section 7.2
Assignments Copies
Section 7.3
Small Integer Caching
Section 7.4
Name Resolution
Section 7.5
Modules Packages
Chapter 8
Classes
Python Language GuideSection 8.1
