CS50P

One idea per week.

Harvard's Python course, drawn as a path. Open a week, then a problem. The picture says what kind of thing goes in and what kind of thing comes out. The program is yours.

  1. Week 0Functions and variablesA program can ask a person something, remember the answer, and hand a result back.
  2. Week 1ConditionalsA program can look at a value and take one path or another.
  3. Week 2LoopsA program can repeat, keep a list, or look something up.
  4. Week 3ExceptionsBad input does not have to crash the program. You can notice it and ask again.
  5. Week 4LibrariesA library is functions someone else already wrote. You import them, or install them first and then import them.
  6. Week 5Unit testsA test calls one function and checks the result. You can run that check again whenever you change the function.
  7. Week 6File I/OA file is text that lives outside the program. You open it, use it, and close it.
  8. Week 7Regular expressionsA pattern describes the shape of text, and it can keep the piece you care about.
  9. Week 8Object-oriented programmingA class bundles data and the actions that belong with that data. Each object made from the class remembers its own data.
  10. Week 9Et ceteraA few smaller tools show up everywhere after this: a set, type hints, extra arguments, and a compact way to build a list.
  11. After week 9Final projectA Python program of your own, bigger than one problem set. The spec lists the files. The idea is yours.