Programming Lab: Python for CSP

Boxes With Names. A variable is a name that holds a value. You create one with an assignment statement , which uses a single equals sign. The name goes on the left and the value goes on the right. The first line stores the number 10 under the name score. The s

8 lessons, each with runnable code in the browser.

  1. Variables and Assignment
  2. Input, Output, and Types
  3. Conditionals and Booleans
  4. Lists and Indexing
  5. Loops: for and while
  6. Procedures: Parameters and Return
  7. Building an Algorithm: Search and Count
  8. A Small Simulation: Putting It Together

Compilearn home