J. Correia Lopes

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:14

T: 15/11/2018

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


Lecture #14 :: 15/11/2018

Goals

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

  • Use the main operations and methods available to work with dictionaries
  • Describe the differences between dictionary aliasing and shallow copying

Content

  • 5.4 Data types: Dictionaries
    • 5.4.1 Dictionary operations
    • 5.4.2 Dictionary methods
    • 5.4.3 Aliasing and copying
    • 5.4.4 Counting letters
    • Sparse matrices
    • Memoization
    • Exercises

Bibliography

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

Materials

  • J. Correia Lopes, Script and illustrations, 14-dictionaries.pdf
  • FPRO, 2018/19, Python code, Lecture's on GitHub
  • Brad Miller and David Ranum, Learning with Python: Interactive Edition. Based on material by Jeffrey Elkner, Allen B. Downey, and Chris Meyers (Chapter 12) HTML
  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3 (RLE), 2012 (Chapter 20) HTML

Summary

  • Dictionary operations and methods. Aliasing and copying. Sparse matrices. Memoization.

FPRO, 2018/19

« Previous | Index | Next »

teach/fpro/lectures/14.txt · Last modified: 14/11/2018 19:09 by Correia Lopes