Week 1: Basics and Expressions
218 words
1 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Week 1: Basics and Expressions > **Course:** Jan 2026 - Python > **Focus:** Types, arithmetic, strings, and the first trap layer of Python expressions. --- ## 1.

Visual strip
Relevant recall pieces for this note
Week 1: Basics and Expressions
Course: Jan 2026 - Python Focus: Types, arithmetic, strings, and the first trap layer of Python expressions.
1. Core idea
Week 1 is about reading expressions exactly as Python does, not as we wish they worked.
What to remember
int,float,str, andboolare the base types.input()always returns a string./gives a float, even if the result looks whole.//is floor division, not normal division.- Strings are sequences, so indexing and slicing work on them.
2. Common traps
5 / 2is2.5, not2."5" + 2is invalid, because string and integer are different types.and/orreturn one of the operands, not alwaysTrueorFalse.s[2]works only ifsis a sequence.
3. Speedrun pattern
When you see a Week 1 question, ask:
- What type is each operand?
- Does the operator return a value or a type?
- Is this expression valid before evaluating its result?
4. Micro revision
- Type check:
type(x) - Cast:
int(...),float(...),str(...) - Sequence access:
s[i],s[a:b:c]
Assignment anchor
Navigation
- Previous: none
- Next: Week 2 Notes