01:198:107 Lecture Notes - Lecture 11: Recursive Definition, Histogram

83 views3 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents