J. Correia Lopes

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:13

T: 13/11/2018

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


Lecture #13 :: 13/11/2018

Goals

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

  • Use the main methods available to work with lists
  • Use generalised for loops with lists
  • Describe pure functions and modifiers (that make side-effects)
  • Describe type conversions (list and range)
  • Use nested lists to work with matrices

Content

  1. Data types
    • 5.3.12 Lists and for loops
    • 5.3.13 List parameters
    • 5.3.14 List methods
    • 5.3.15 Pure functions and modifiers (make side-effects)
    • 5.3.16 Functions that produce lists
    • 5.3.17 Strings and lists
    • 5.3.18 Type conversions: list and range
    • 5.3.19 Looping and lists
    • 5.3.20 Nested lists
    • 5.3.21 Matrices
    • 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.3) PDF

Materials

  • J. Correia Lopes, Script and illustrations, 13-working-w-lists.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 10) 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 11) HTML

Summary

  • Lists. List methods. Looping and lists. Pure functions and modifiers. Type conversions: list and range. Nested lists.

FPRO, 2018/19

« Previous | Index | Next »

teach/fpro/lectures/13.txt · Last modified: 12/11/2018 23:04 by Correia Lopes