Start Here — A Complete Tour
Names, subscripts & arrays
continues from lesson 2 — values defined earlier in the course stay live here
Two naming ideas worth knowing early:
- Subscripts are part of the name. Type
v_max(a letter, underscore, then more) and you get the single variable v-max — not "v indexed by max". Subscripts are how engineers writeR_1,T_in,v_max, and they never collide with a unit. - Brackets are array indexing.
readings[0]pulls an element out of a list, counting from 0.
one variable named v_max — the subscript is just part of the name
= a list / vector
= index 0 is the first element
= index 2 is the third
✓ pass indexing counts from zero