6.100L | Fall 2022 | Undergraduate

Introduction to CS and Programming using Python

Lecture 2: Strings, Input/Output, and Branching

This lecture discusses the core elements of programs: strings, input/output, f-strings, operators, branching, and indentation. Big idea: Debug early, debug often. Write a little and test a little. Don’t write a complete program at once. It introduces too many errors. Use the Python Tutor to step through code when you see something unexpected!

Select language:

Course Info

Fall 2022
Lecture Notes
Lecture Videos
Podcasts
Problem Sets
Problem-solving Notes
Programming Assignments with Examples
Readings