Class Notes (785,471)
Canada (481,633)
CMPT 120 (43)
Greg Baker (15)
Lecture

Storing Information and Types
Storing Information and Types

1 Page
77 Views
Unlock Document

School
Simon Fraser University
Department
Computing Science
Course
CMPT 120
Professor
Greg Baker
Semester
Fall

Description
9142007CMPT120Storing Informationyou will often want to store the result of an expressionoeg input from the userintermediate results value not needed until latervariables are used for thisoyou can put any kind of information in Python into a variablea variable gets a name so we can refer to it laterothe name should indicate the purpose of the variableto put a value in a variable use a variable assignment statementothese look likevariablenameexpressionoegmessageHello worldarea126setting a variables value like this causes some of the computers memory to be reserved and associates the variable name with that spaceto use a variables contents refer to it by name in an expressionoegprint messagedoublearea2print area2important the variable
More Less

Related notes for CMPT 120

Log In


OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.

Submit