ECON 3209 · Week 1, Lecture 3 · Kerala Agricultural University
Autumn 2026
By the end of this lecture, you will be able to:
/ always returns a float in Python 3. Use // when you need whole-number division (e.g., counting periods).
Short-circuit evaluation is how Python avoids runtime errors in compound conditions.
Rule of thumb: If you’re unsure about precedence, add parentheses. They’re free and make code readable.
A cooperative bank has the following loan eligibility rules:
has_default = False)Write a Python expression that evaluates to True if an applicant with income=35000, loan=500000, credit_score=680, has_default=False is eligible. Use meaningful variable names and print the individual checks.
✅ Arithmetic: + - * / // % ** — watch out for / vs //
✅ Comparison: == != > >= < <= — return bool; can be chained
✅ Logical: and or not — use for compound conditions; short-circuit evaluation saves errors
✅ Assignment: += -= *= /= — compact in-place updates
✅ Membership: in / not in — works on lists, strings, dict keys
✅ Precedence: ** > * / > + - > comparisons > not > and > or — use () when unsure
✅ None represents missing/absent values — check with is None
This week you built the foundation of Python programming:
| Lecture | Topic | Status |
|---|---|---|
| 1 | Getting Started — Jupyter, arithmetic, imports | ✅ |
| 2 | Variables & Data Types — int, float, str, list, dict | ✅ |
| 3 | Operators & Expressions — arithmetic, boolean, compound | ✅ |
Next Week: Control Flow & Functions — if/else, for loops, while loops, defining your own functions
ECON 3209 — Kerala Agricultural University