J. Correia Lopes

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:08

T: 18/10/2018

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


Lecture #8 :: 18/10/2018

Goals

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

  • Identify functions that return a value (fruitful functions)
  • Enumerate the diverse uses of the return statement
  • Describe and use boolean functions
  • Describe and use incremental program development
  • Identify uses of function composition
  • Enumerate the main PEP8 rules for writing Python programs

Content

  • 4.10 Return values
  • 4.11 Program development
  • 4.12 Debugging with print
  • 4.13 Composition
  • 4.14 Boolean functions
  • 4.15 Programming with style
  • Exercises

Bibliography

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

Materials

  • J. Correia Lopes, Illustrations presented in class, 08-fruitfulfunctions.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 (Chapter 6) HTML
  • Brad Miller and David Ranum, Learning with Python: Interactive Edition. Based on material by Jeffrey Elkner, Allen B. Downey, and Chris Meyers HTML

Summary

  • Functions that return a value. Use of the return statement. Boolean functions. Incremental programming. Function composition. PEP8.

FPRO, 2018/19

« Previous | Index | Next »

teach/fpro/lectures/08.txt · Last modified: 17/10/2018 18:19 by Correia Lopes