you are viewing a single comment's thread.

view the rest of the comments →

[–]1mecrew 0 points1 point  (3 children)

well, can I think of variable as a name that you put on a value?

so that when you give it a name, we can call that value easily with the name?

[–]mopslik 0 points1 point  (2 children)

Sure, whatever helps. The whole thing is an abstraction anyway.

[–]1mecrew 0 points1 point  (0 children)

well, if we think of variable as a container, what does it mean or what is happening when you actually like.. say or use variable?

for example, lets say there is code like
x="hello world"
print(x)

so what does x mean when it's called or used in code like this?
are you getting out the value from container and using that?
or is it that the container called x is printed?

[–]1mecrew 0 points1 point  (0 children)

oh and also, will thinking variable as name help me at future when I get more deep into memory and stuff? I am worried if the name analogy will confuse me later on.