Week 1: Foundations I#
See also
Full context: root README, Week 1.
Goal#
Programming logic, the command line, git, and how software actually runs, in Python. There is no project to build for its own sake yet (that starts in Week 2). This week is about getting fluent in reading and writing basic logic and the tools around it, so that everything after this week can assume you have that fluency.
Tip
If this is your first time writing code at all, that's exactly who this week is for. Every concept here gets explained before it gets used. If something still doesn't click on the first read, that's normal, not a sign you're behind: reread the note, then try the exercise, then reread the note again if needed. That loop (read, try, reread) is most of what "learning to program" actually is.
Days#
- Days 1-2: variables, conditionals, loops, functions. Isolated exercises only, no project yet. (Dev environment setup was covered in Week 0; if you haven't done that yet, do it before starting here.) This now includes twenty isolated exercises (five per concept, up from the original eight) and two guided walkthroughs (
09_guided_grade_report.mdand22_guided_password_audit.md), giving real repetition across different scenarios before Day 3, not just one worked example per concept. - Day 3: the command line and git (navigating, running scripts, reading error output, commit/branch/push/pull, and why version control exists).
- Days 4-5: client vs. server, what an API is, request/response cycles, what hosting means. Ends with a small script that calls a public API and does something with the response, with three optional stretch goals in
project/README.mdfor anyone who finishes the main script with time to spare.
Do this in order#
Everything below is required, in the grouped order shown, except the one line explicitly marked optional at the end. Within a group (like "variables exercises"), the files can be done in any order; check each one off as you finish it, not as you open it.
notes/01-variables-and-data-types.md, thenexercises/01,02,10,11,12(any order).notes/02-conditionals.md, thenexercises/03,04,13,14,15(any order).notes/03-loops.md, thenexercises/05,06,16,17,18(any order).notes/04-functions.md, thenexercises/07,08,19,20,21(any order).exercises/09_guided_grade_report.md, a guided walkthrough combining all four concepts above. Line-by-line, do it after step 4, not alongside it.exercises/22_guided_password_audit.md, a second guided walkthrough. Similar ground to step 5, still worth doing in full: building carefully from precise instructions is its own skill, separate from the independent problem-solving steps 1-4 asked for.notes/05-command-line.mdandnotes/06-git-basics.md(Day 3). Tool skills, not programming logic, but used every day from here on.notes/07-how-the-internet-and-apis-work.md(Day 4), thenproject/README.md's walkthrough (Day 4-5): a script that calls a real public API.- Optional, if you finish step 8 with time left:
project/README.md's three stretch goals (fetching several unique results, a fetcher that works across more than one API, an interactive loop). Skippable without leaving a gap in what Week 2 assumes you know.
After a real attempt at any step, compare against the matching file in solutions/, which covers every exercise, the project, and its stretch goals.
Deliverable#
A small script that calls a public API and does something with the response (see project/).
Status#
Note
Notes, exercises, project, and solutions are written for this week.