J. Correia Lopes

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:04

T: 04/10/2018

Master in Informatics and Computing Engineering
Programming Fundamentals
Instance: 2018/2019


Lecture #4 :: 04/10/2018

Goals

By the end of this class, the student should be able to:

  • Describe conditionals and selection
  • Describe Boolean values, logical operators, and expressions
  • Describe the use of if-then-else blocks for conditional execution

Content

  • 3.2. Conditionals
    • 3.2.1 Boolean values and expressions
    • 3.2.2 Logical operators
    • 3.2.3 Truth Tables
    • 3.2.4 Simplifying Boolean Expressions
    • 3.2.5 Conditional execution
    • 3.2.6 Omitting the else clause
    • 3.2.7 Chained conditionals
    • 3.2.8 Nested conditionals
    • 3.2.9 Logical opposites
    • Exercises

Bibliography

  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3, 2012 [PDF 2018] (Section 3.2)

Materials

  • J. Correia Lopes, Illustrations presented in class, 04-conditionals.pdf
  • FPRO, 2018/19, Code present in class, Lecture's on GitHub
  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3 (RLE), 2012, [HTML] (Chapter 5)
  • Brad Miller and David Ranum, Learning with Python: Interactive Edition. Based on material by Jeffrey Elkner, Allen B. Downey, and Chris Meyers [HTML] (Chapter 7)

Summary

  • Conditionals and selection. Boolean values and expressions. Logical operators. Conditional execution. If-then-else and nested conditionals.

FPRO, 2018/19

« Previous | Index | Next »

teach/fpro/lectures/04.txt · Last modified: 02/10/2018 22:13 by Correia Lopes