ECON 3209 · Week 1, Lecture 2 · Kerala Agricultural University
Autumn 2026
By the end of this lecture, you will be able to:
int, float, str, boollist, tuple, and dict objectstype() and isinstance()A variable is a named storage location in memory.
Python uses dynamic typing — you don’t declare the type; Python infers it.
int)float)str)bool)Create a Python dictionary for a cooperative society with these details, then compute and print the loan-to-deposit ratio:
Print each detail with proper formatting. The loan-to-deposit ratio is loans / deposits.
✅ Variables store data; Python infers types dynamically
✅ Scalar types: int (whole numbers), float (decimals), str (text), bool (True/False)
✅ Collections: list (mutable, ordered), tuple (immutable, ordered), dict (key-value pairs)
✅ f-strings are the cleanest way to format output: f"GDP: ₹{gdp:,.0f}"
✅ Use type() to inspect, isinstance() to check types in code
Lecture 3 — Operators & Expressions
We will cover: - Arithmetic, comparison, and logical operators - String operators - Introduction to None and truthiness - Building compound expressions for data filtering
ECON 3209 — Kerala Agricultural University