00:01
Okay, moving on with our cs journey and diving a little bit deeper into variables.
00:08
And, you know, as i said before, variables are one of those components that are really going to make or break your understanding of how to write code as being able to understand how variables work, assigning them values, reading those values, and so on.
00:22
So we're going to talk a little bit about assigning values to variables or variable assignment.
00:27
So the idea of assigning value is kind of like the idea of storing a value in memory and then using that variable name to point to that memory.
00:40
So we've talked already about computer memory and what's going on there.
00:45
And that's what's really happening with variable assignment is when we create a variable and we give it a name like x or age, what we're really doing is we're just reserving a little block of memory.
00:55
And we're letting the program know that if you see the name of that variable, if you see age or if you see x, and you need to know its value, go to this spot in memory and get it.
01:04
And so assigning is about actually storing a value into that memory location.
01:11
So using pseudo code, so again, not syntax for a language, but just to help us as programmers organize, we could say something like set x equal 17, and that equal sign will be used in pretty much all syntax, and that's saying that set the value of x to 17, which in the background means go to the memory location referenced by x and store the number 17 in that memory location.
01:37
So that later, if i do a display x, my code looks at that and says, hey, x is a variable name.
01:42
I know that variable name...