CSE 1010 Lecture Notes - Fall 2018 Lecture 4 - Assignment (computer science)

67 views3 pages
Verified Note

Document Summary

Cse 1010 - introduction to computer science and engineering. A list is a compound data type. Contains values of other types of data. A way to store more than one value in a given variable. Also known as a data structure (it gives your data some structure) It is a way to associate values together. >>> squares = [1, 4, 9, 16, 25] Indexing means accessing single elements in a list. Lists are indexed by using a 0-based subscript. Indices: 0 1 2 3 4 (make this into a chart based on slides) The legal subscripts (indexes) go from 0 up to the length of the list (minus 1, because it starts at 0) You can use len( ) to calculate the length of that list. If you use an index number that is greater than the amount of values in that index, then it will return with an index error.

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