Strings, Input/Output, and Branching
At a glance
- Price Free to watch, no sign-up
- Runtime 1 h 19 min
- Topics Computer Science, Education
- Source MIT, Introduction to CS and Programming using Python
- Lecture Lecture 2 of 25
- Language English
MIT lecturer Ana Bell continues the introductory programming sequence 6.100L, Introduction to CS and Programming using Python, with a session on core building blocks of Python programs. She covers strings and string operations, input and output functions, f-strings for formatting output, comparison and logical operators, and branching with if statements, including how indentation determines program structure in Python. Bell repeatedly returns to a practical debugging philosophy: write small pieces of code, test them immediately, and avoid writing a complete program before checking any of it, since large untested blocks introduce too many simultaneous errors to trace. She also demonstrates Python Tutor as a tool for stepping through code line by line to see exactly how values change, useful when a program's behavior does not match expectations. The lecture runs just over an hour and continues directly from the course's first session on variables and expressions.