{
  "format": "tokbit",
  "version": 1,
  "name": "Addition table",
  "main": [
    {
      "id": "u1",
      "kind": "for",
      "variable": "i",
      "range": "1, 11",
      "body": [
        {
          "id": "u2",
          "kind": "declare",
          "name": "row",
          "type": "str",
          "init": "\"\""
        },
        {
          "id": "u3",
          "kind": "for",
          "variable": "j",
          "range": "1, 11",
          "body": [
            {
              "id": "u4",
              "kind": "declare",
              "name": "s",
              "type": "str",
              "init": "str(i + j)"
            },
            {
              "id": "u5",
              "kind": "while",
              "condition": "len(s) < 3",
              "body": [
                {
                  "id": "u6",
                  "kind": "assign",
                  "target": "s",
                  "value": "\" \" + s"
                }
              ],
              "comment": "Pads with spaces on the left so the numbers line up."
            },
            {
              "id": "u7",
              "kind": "assign",
              "target": "row",
              "value": "row + s"
            }
          ]
        },
        {
          "id": "u8",
          "kind": "output",
          "values": "row"
        }
      ]
    }
  ],
  "functions": [],
  "comment": "Solution to the task “Addition table”: Change the program to add instead of multiply. Which two things do you need to change so the table stays aligned?"
}
