JCL

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:05

LE05: 26/10/2020

Master in Informatics and Computing Engineering
Programming Fundamentals
Instance: 2020/2021


Lecture #5 :: 26/10/2020

Goals

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

  • Describe function definition and formal parameters
  • Describe function body and local variables
  • Describe function call, actual parameters or arguments and the flow of execution
  • Describe void functions and fruitful functions that return values
  • Use the Python Help and understand its meta-notation
  • Describe the basic of program debugging

Content

  • 4. Functions
    • 4.1 Functions
    • 4.2 Functions can call other functions
    • 4.3 Flow of execution
    • 4.4 Functions that require arguments
    • 4.5 Functions that return values
    • 4.6 Variables and parameters are local
    • 4.7 Turtles Revisited
    • Exercises
  • Help & debug
    • 3.3.8 Help & Meta-notation
    • Debugging Interlude

Bibliography

  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3, Release 3rd Edition, 2020 [PDF] (Chapter 4, Section 3.3.8)

Materials

Summary

  • Functions. Function definition and function call. Formal and actual parameters. Flow of execution. Return values. Help and Meta-notation. Debugging Interlude.

FPRO, 2020/21

« Previous | Index | Next »

teach/fpro/lectures/05.txt · Last modified: 03/01/2021 17:40 by Correia Lopes