01:198:107 Lecture Notes - Lecture 11: Recursive Definition, Histogram
Document Summary
A vector can be thought of as a bunch of variables tied together. Each variable in the bunch has a 2-part name. The value of a variable selects which other variable to use. An assignment statement can assign a new value to a vector element. If needed, extend vector scores to index 5. Store 0 in variable at index 5 of vector scores. There are many ways to use vectors. We can classify them by asking what does the index mean? . Nothing special - just a way to loop through the data. Relative order-j>k implies something about numbers(j) and numbers(k) Something specific, eg numbers(j) is a count of j"s in a vector. Vector of grades count of how many of each. Starting from 4, cross out every second number. Starting from 6, cross out every third number. Starting from 10 cross out every fifth number. What prime are we currently skipping by.