Week 4 — Readings & Resources · Booleans & Conditionals
Course: Introduction to Computer Science — CS1 / Programming Fundamentals in Python (CSCI 1101) · Silver Oak University (fictional sample) · Prof. Okafor
Objective covered: Objective 3 — Use Boolean logic and conditionals (comparison & logical operators, truth tables, if/elif/else) to make programs decide.
How to use this page
Everything here is a link to an external resource — open it in your browser. Nothing needs to be downloaded or installed; the Python environments below run in the browser.
This week's habit is the same one that carries the course: never trust a True/False you didn't run. Before you believe a page (or a chatbot) about what True or False and False evaluates to, or which branch an if/elif/else takes, paste it into the runner and run it yourself.
Order that matches the lecture: ① the
booltype + comparison & logical operators → ② truth tables & precedence → ③if/elif/elseand which branch runs → ④ the=-vs-==trap.
① Your Tools — keep these open (you'll use them every week)
Run Python in your browser — a free online editor (no install)
🔗 https://www.online-python.com/
Why it earns the click: this is where you'll run every Boolean expression and every if/elif/else this week. Type it, press Run, read the True/False or the branch that printed. (A second option, if you ever want it: 🔗 https://www.programiz.com/python-programming/online-compiler — same idea.)
⏱ 1 min to open and run print(True and not False)
See your code decide, step by step — Python Tutor
🔗 https://pythontutor.com/
Why it earns the click: the single best tool this week. Paste an if/elif/else, click forward, and watch Python check each condition and jump to the branch that runs. Tracing "which branch runs" stops being abstract.
⏱ ~5 min to step through a conditional
② Booleans, Comparison & Logical Operators · and ③ Truth Tables & Precedence
Maps to Lecture Segments 2–3. The
booltype (True/False);==,!=,<,>,<=,>=;and,or,not; and the precedencenot→and→or.
Read & do — "Python Operators" (Programiz)
🔗 https://www.programiz.com/python-programming/operators
Why it's assigned: the cleanest single page on comparison operators and logical operators (and, or, not), with a worked truth table. Read the "Comparison Operators" and "Logical Operators" sections, then type each example into the runner above and confirm the True/False yourself.
⏱ ~10 min
Interactive — "Python Booleans" (W3Schools)
🔗 https://www.w3schools.com/python/python_booleans.asp
Why it earns the click: a friendly, click-through intro to True/False, what counts as truthy vs. falsy (why 0 and "" act like False), and the green "Try it Yourself" button so you run code right on the page.
⏱ ~8 min
④ Conditionals: if / elif / else and Which Branch Runs
Maps to Lecture Segments 4–6. Routing to exactly one branch, ordering your
elifs, and the=-vs-==trap.
Read & do — "Python if...else Statement" (Programiz) (new this week)
🔗 https://www.programiz.com/python-programming/if-elif-else
Why it's assigned: a clear, example-driven walk-through of if, if...else, and if...elif...else, including a grade-by-score example just like our ticket-price and letter-grade programs from class. Has a short embedded video at the bottom. Read it, then run the grade example in the editor and change the score to see which branch runs.
⏱ ~10 min
Interactive — "Python Conditions and If statements" (W3Schools) (new this week)
🔗 https://www.w3schools.com/python/python_conditions.asp
Why it earns the click: a friendly, click-through page on conditionals with and/or/not inside conditions and "Try it Yourself" buttons on every example. The cleanest place to drill "what does this if print?" on the page itself.
⏱ ~8 min
Read — "More Control Flow Tools" (official Python Tutorial, §4.1 if) (new this week)
🔗 https://docs.python.org/3/tutorial/controlflow.html
Why it's assigned: the source of truth. Read §4.1 (if Statements) — the official if/elif/else example (negative/zero/single/more) shows exactly the chain we built in class, from the people who make Python. (Skip ahead past §4.1 for now; for, functions, and match are later weeks.)
⏱ ~6 min
Optional one-stop references (free online)
- Programiz — "Precedence and Associativity of Operators in Python." If the
not→and→orordering (and where comparisons fall) ever confuses you, this is the full precedence table in one place.
🔗 https://www.programiz.com/python-programming/precedence-associativity - Programiz — "Getting Started with Python" (full Python tutorial index). A free, well-organized tutorial you can return to all term; it covers every topic in this course in order.
🔗 https://www.programiz.com/python-programming
Pick-one quick path (≈15 min total)
In a hurry? Do exactly these two and you'll be ready for the quiz:
1. Read the "Logical Operators" section of "Python Operators" (Programiz), then run print(True or False and False) and print(not (3 > 2)) in the editor and see what they actually print (group ②).
2. Read "Python if...else Statement" (Programiz), run the grade example, and change the score so a different branch runs (group ④).
Heads-up (links rot): these point to outside sites that occasionally move or rename pages. If a link ever fails, tell Prof. Okafor and use the official Python Tutorial (docs.python.org/3/tutorial/controlflow.html) or W3Schools (w3schools.com/python) in the meantime.
~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com