🔤Dynamically Typed Language
Also known as Dynamic Typing, Dynamically Typed
A language that checks types as the code runs, not before.
Think of it like
Think of it like a plain box. You can put a toy in it today and a sock in it tomorrow.
Example
Emma stores 30 in age, then "thirty". Python is fine with both, so the slip only shows when she tries to add 1.
Why it matters
Quick to write, so it suits scripts and early ideas. Big projects often add type checks later.
Definition
Example code
python
age = 30
age = "thirty"
print(age)
# thirtyCommon mistake
Key takeaways
- 1Checked while running. A type slip shows on that line only.
- 2Flexible boxes. A variable can change what it holds.
- 3Quick to write. No type labels to type out.