Chapter 2: A Crash Course in Python
Introduction
Python is the most popular language for Data Science.
It is popular because: simple syntax, readability, and huge library support.
This chapter revises Python basics before Data Science.
1. Python Basics
1.1 Numbers & Arithmetic
Python works with integers (whole numbers) and floats (decimal numbers).
Examples:
5 + 3 # 8
10 - 4 # 6
2 * 3 # 6
7 / 2 # 3.5 (normal division)
7 // 2 # 3 (integer division)
7 % 2 # 1 (remainder)
2 ** 3 # 8 (power)