Py: Lesson 1

For the first lesson, we looked at:

  • Installing Visual Studio Code, Python3, Node and JavaScript
  • Running Python from a REPL (read-eval-print-loop) or console window
  • Basic programming concepts
    • A computer as sequentially labeled memory boxes with numbers 0-255 stored as 8 bits and a machine that can read and write the number stored in any box, and do simple operations like + – / * on them
    • A variable as a more complex labeled box that you can store stuff into. With object-oriented languages, you can store different types of things, and the variable knows what type of thing it is, e.g. a number, string, list or dictionary.
    • Accessing values in lists/arrays/vectors (all 3 are very similar) by an index, e.g. a[3].
    • Functions, like print, chr, ord, range use parentheses around the “parameters” passed to the function. A function takes parameters and generates a result, and sometimes, a so-called side-effect, like outputting text to the screen.
    • Automatically constructed lists, e.g. using the range(start, past) function.
    • For loops using the for <variable name> in <list>: syntax, and an indented next line that can access each value in the list using the variable name.