J. Correia Lopes

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:22

T: 13/12/2018

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


Lecture #22 :: 13/12/2018

Goals

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

  • Describe the contents of the random, time and math modules.
  • Create programmer own modules.
  • Describe namespaces, identifier scopes and lookup rules.

Content

  • Modules
    • 8.1 Random numbers
    • 8.2 The time module
    • 8.3 The math module
    • 8.4 Creating your own modules
    • 8.5 Namespaces
    • 8.6 Scope and lookup rules
    • 8.8 Three import statement variants

Bibliography

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

Materials

  • J. Correia Lopes, Script and illustrations, 22-modules.pdf
  • FPRO, 2018/19, Python code, Lecture's on GitHub
  • The Python Tutorial, 6. Modules, Python 3.6.7 documentation, Release 3.6.7, November 20, 2018 HTML

Summary

  • Modules. Random, time and math modules. Creating a new module. Namespaces, scope and lookup rules.

FPRO, 2018/19

« Previous | Index | Next »

teach/fpro/lectures/22.txt · Last modified: 12/12/2018 17:13 by Correia Lopes