6.100L Introduction to CS and Programming Using Python
6.100L Introduction to CS and Programming Using Python (Fall 2022, MIT OCW). Instructor: Dr. Ana Bell. This subject is aimed at students with little to no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems. It also aims to help students, regardless of their major, feel justifiably confident in their ability to write simple programs that allow them to accomplish useful goals. The class will use the Python 3 programming language. (from ocw.mit.edu)
Lecture 10 - Lists and Mutability (Fixed) |
This lecture explores list operations and mutability: mutation, aliasing, and tricky examples with loops over L. Lists and tuples provide a way to organize data that naturally supports iterative functions. Tuples are useful when you have data that doesn’t need to change, e.g., (latitude, longitude) or (page #, line #). Lists are useful in dynamic situations, e.g., a list of daily top 40 songs or a list of recently watched movies.
Go to the Course Home or watch other lectures: