CS 1110 Lecture Notes - Lecture 15: Ligier, Ligier Js1, Emar

25 views3 pages

Document Summary

10/8/15 -- lesson 15 -- more with sequences. Adds up all the elements in the list x. Find the min/max value in the list x. Range(a,b,c) produces [a, a+c, a+2*c, , a+ c *((b-a)/c] Starts at a, increases by c each time. Converts x (such as a string) to a list. Example: list("mimsy") produces ["m", "i", "m", "s", "y"] Calls the function f once for each item. Useful to create an empty list before manipulating the previous one. We can have lists inside of lists such as x = [1,[2,1], [1,4,[3,1]], 5] Represent a table of data as a list of lists: Store elements as lists of lists (row-major order) Access value at row 3, col 2: d[3][2] Assign value at row 3, col 2: d[3][2] = 8. Number of columns in row r of d: len(d[r]) A new copy will refer back to the original folder. This changes in one folder will change the other folder as well.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents