Textbook section
Week 1: Foundations
Read the chapters for Week 1 as clean web pages with navigation, code blocks, and section links.
Ch. 1: What Is Computation?Chapter 1: What Is Computation?Most people think of a computer as the physical device sitting on a desk or
Ch. 2: Types, Variables, and ExpressionsChapter 2: Types, Variables, and ExpressionsEvery piece of data in Python has a type. The type determines what kind
Ch. 3: Strings and Sequence ThinkingChapter 3: Strings and Sequence ThinkingA string (str) is a sequence of characters. Characters can be letters,
Ch. 4: Input, Output, and FormattingChapter 4: Input, Output, and Formattingprint() displays values on screen. It is Python's primary output tool.
Ch. 5: Branching — Programs That Make DecisionsChapter 5: Branching — Programs That Make DecisionsSo far, all programs we've written execute line by line, top to bottom.
Ch. 3–5 Practice ProblemsChapter 3–5 Practice Problems1. Given s = "programming", what are the values of: