InfoCoBuild

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 03 - Iteration

An introduction to control flow and iteration through loops. Looping mechanisms include while and for loops. Lots of syntax today, be sure to get lots of practice! While loops loop as long as a condition is true and you need to make sure you don't enter an infinite loop. For loops can loop over ranges of numbers and elements of a string.


Go to the Course Home or watch other lectures:

Lecture 01 - Introduction
Lecture 02 - Strings, Input/Output, and Branching
Lecture 03 - Iteration
Lecture 04 - Loops over Strings, Guess-and-Check, and Binary
Lecture 05 - Floats and Approximation Methods
Lecture 06 - Bisection Search (Fixed)
Lecture 07 - Decomposition, Abstraction, and Functions
Lecture 08 - Functions as Objects
Lecture 09 - Lambda Functions, Tuples, and Lists
Lecture 10 - Lists and Mutability (Fixed)
Lecture 11 - Aliasing and Cloning
Lecture 12 - List Comprehension, Functions as Objects, Testing, and Debugging (Fixed)
Lecture 13 - Exceptions and Assertions
Lecture 14 - Dictionaries
Lecture 15 - Recursion
Lecture 16 - Recursion on Non-numerics
Lecture 17 - Python Classes
Lecture 18 - More Python Class Methods
Lecture 19 - Inheritance
Lecture 20 - Fitness Tracker Object-Oriented Programming Example
Lecture 21 - Timing Programs and Counting Operations
Lecture 22 - Big Oh and Theta
Lecture 23 - Complexity Classes Examples
Lecture 24 - Sorting Algorithms
Lecture 25 - Plotting
Lecture 26 - List Access, Hashing, Simulations, and Wrap-up