Wednesday, 5 February 2014

3.1.1 Variables


Variables in a computer program can be thought of as "Buckets" or "Envelopes" where information can be stored in computer memory and referenced. On the outside of the bucket is a name. When referring to the variable, we use the name of the variable, not the data stored in the variable.
This is an example of a variable E.g.
name = “Bob”
age = 19
dob = “26/08/2004”

print(name)

Bob

No comments:

Post a Comment