JCL

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:22

LE22: 14/01/2021

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


Lecture #22 :: 14/01/2021

Goals

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

  • Describe and perform (simple) unit testing
  • Describe the use of the function main()
  • Describe the use of global variables
  • Describe the use of type hints for static type checking

Content

  • Program development
    • Unit testing
    • Using a main() function
    • Global variables
    • Tips & tricks
    • Static type checking and type hints
    • Exercises

Bibliography

  • Brad Miller and David Ranum, Learning with Python: Interactive Edition. Based on material by Jeffrey Elkner, Allen B. Downey, and Chris Meyers [HTML] (Section 6.3 and Section 6.8)
  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3 (RLE), 2012 [HTML] (Section 6.7)
  • 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] (Section 4.18)
  • Geir Arne Hjelle, Python Type Checking (Guide), Real Python, 2019 [HTML]

Materials

Summary

  • Introduction to Unit testing. Use of main() function. Global variables. Program development tips and tricks. Static type checking and type hints.

FPRO, 2020/21

« Previous | Index | Next »

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