6.100L | Fall 2022 | Undergraduate

Introduction to CS and Programming using Python

Lecture 10: Lists, Mutability

Topics: List Operations, Mutability: mutation, aliasing, tricky examples with loops over L

Lecture Notes

Lecture 10: Lists, Mutability

Lecture 10 Code

Readings

Ch 5.3–5.5

Finger Exercise Lecture 10

Implement the function that meets the specifications below:

def all_true(n, Lf):
    """ n is an int
        Lf is a list of functions that take in an int and return a Boolean
    Returns True if each and every function in Lf returns True when called 
    with n as a parameter. Otherwise returns False. 
    """
    # Your code here

# Examples:    
all_true() # prints 6

6.100L Finger Exercises Lecture 10 Solutions

Recitation 5

Recitations were smaller sections that reviewed the previous lectures. Files contain recitation notes and worked examples in code.

Recitation 5 Notes and Code

Course Info

Instructor
As Taught In
Fall 2022
Learning Resource Types
Lecture Videos
Lecture Notes
Problem Sets
Programming Assignments with Examples
Readings
Recitation Notes