JCL

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:12

LE12: 26/11/2020

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


Lecture #12 :: 26/11/2020

Goals

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

  • Distinguish between mutable and immutable datatypes & describing aliasing
  • Distinguish between ordered and unordered datatypes
  • Use the main operations and methods available to work with sets
  • Use immutable sets (frozensets)

Content

  • Data types: Sets & Frozensets
    • 9.1 Mutable versus immutable and aliasing
    • 9.2 Sets and frozensets
    • Accessing Set Elements
    • Adding Items to a Set
    • Removing Items from a Set
    • Set alias and cloning
    • Set operations
  • More datatypes
    • Collections module

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] (Section 9.1, 9.2)

Materials

Summary

  • Mutable and immutable datatypes. Aliasing and shallow copy. Datatypes: Sets & Frozensets. Hashing. Use the main operations and methods available to work with sets. Memoisation.

FPRO, 2020/21

« Previous | Index | Next »

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