CSE 1010 Lecture 2: VARIABLES & LISTS

52 views5 pages
jadetortoise401 and 55 others unlocked
CSE 1010 Full Course Notes
84
CSE 1010 Full Course Notes
Verified Note
84 documents

Document Summary

Week 2 - lecture 2 - variables & lists. A variable is a named storage location. The storage location can store one thing. You can replace what"s in the storage location. It assigns the value 5 to the variable called a. The motion is from the right hand side to the left hand side. In python"s memory (but you don"t see this) >>> a (what is the value of a?) Type in a = 10 (what happens?) >>>a (what is the value of a?) Python can never answer what was the value of a. Type in b = a + 3, enter. A variable won"t change if there is no assignment statement. Type in a = 7 (what will happen to b ?) There is no dependency between a and b, after python has memorized the value of b. Python does not go back to redo it automatically. Again: only an assignment statement will change a variable.

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