What's here
1 · Basics
| Page | Covers |
|---|
| Values and Types | type() vs isinstance(), dynamic typing, casting, truthiness |
| Variables and Naming | Identifier rules, the 35 keywords, PEP 8 conventions |
| Data Types | All eight built-ins — int float str bool list tuple dict set |
| Expressions and Operators | Arithmetic, precedence, and five ways to structure the same answer |
| F-Strings | Format specs, alignment, padding, debug mode |
| Input and Output | input(), print() with sep and end |
2 · Control Flow
| Page | Covers |
|---|
| Conditional Statements | if / elif / else, nesting, and or not, ternary, match |
| Loops | for, range(), while, break, continue, the loop else, nesting |
3 · Collections
| Page | Covers |
|---|
| Strings and Slicing | Indexing, the three-part slice, immutability, string methods |
| Lists | Mutating methods, sort vs sorted, the reference trap, comprehensions |
| Tuples | The trailing comma, shallow immutability, unpacking, tuple vs list |
| Dictionaries and Sets | Key lookup, .get(), hashable keys, set algebra |
4 · NumPy
| Page | Covers |
|---|
| Arrays and Attributes | Creating arrays, the six attributes, dtypes, array vs list |
| Indexing, Slicing and Reshaping | 2-D access, views vs copies, boolean masks, reshape |
| Operations and Broadcasting | Element-wise maths, broadcasting rules, ufuncs, @, sorting |
| Aggregations and Statistics | mean/median/std, the axis argument, ddof, nan |
5 · Pandas
| Page | Covers |
|---|
| Series and DataFrames | The two structures, the index, label vs position |
| Loading and Saving Data | read_csv/excel/json, writing out, index=False |
| Inspecting Data | head, shape, dtypes, info(), describe() |
| Cleaning Data | fillna vs dropna, duplicates, type conversion |
| Selecting and Transforming | loc vs iloc, filtering, sorting, groupby, merge |
6 · Statistics & EDA
7 · Visualization
| Page | Covers |
|---|
| Choosing a Chart | Which chart answers which question, and which library to use |
| Matplotlib | Line, bar, histogram, scatter, pie, subplots, savefig |
| Seaborn | data=/x=/y=, box, violin, heatmap, pair plot |
| Plotly | Interactive charts, hover_data, bubble charts, exporting |
Practice questions
Most pages end with a Practice Questions section, drawn from the Unit 1 and Unit 2
question banks and grouped by their original section so you can cross-reference the paper.
| Tag | Means |
|---|
| [OUT] | Predict the output. Exact text — brackets, quotes, spacing, NaN, and the dtype: footer all count. |
| [PROG] | Write the program. Complete, runnable code. |
| [THEORY] | Explain in words. |
| [PLOT] | Write the plotting code. Include the title, axis labels and plt.show(). |
The number in [ ] is the mark allocation.
No answers are included, deliberately. Work each one out on paper first, then check it by
running the code — the page above it has everything you need.
Notes on [OUT] questions:
type(x) prints <class 'int'>, not int
- Python prints strings with single quotes:
'mouse', not "mouse"
- Tuples print with
( ), lists with [ ] — don't swap them
- A
Series prints its index on the left and a dtype: line at the bottom; both are output
- Missing values print as
NaN, never as None or blank
- One
NaN makes the whole column float64, so 85 prints as 85.0
- If a line raises, name the exception type and note that execution stops there
Notes get published a topic at a time, once the material is actually worked through
rather than just collected.