Lecture 3 — Python Logic and Statements

Reading

This material is drawn from Chapter 5 of Practical Programming, 3rd edition.

Making Choices

  • One of the fundamental reason of using programming is to solve problems.

  • A major portion of problem solving involves decision making therefore very early

on in the course we will learn about Boolean Types in Python.

  • We will build Boolean expressions and understand their outcomes and get acquainted with

operators in Python.

  • If-Else statements (Also called control flow statements) play an important role in

structuring the flow of decision making steps in programs. We will discuss those as well.

Topics for Today

  • Comparison Operators

  • Boolean Types

  • If-Else Statements