Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,330 --> 00:00:04,260
So first of all, I want you guys to think of variables as they are boxes.
2
00:00:04,530 --> 00:00:06,840
Let's think with that simple analogy, shall we?
3
00:00:07,230 --> 00:00:10,380
I want you to think of variables as simple boxes.
4
00:00:10,470 --> 00:00:14,760
And we know some facts about boxes which are, first of all, the box type.
5
00:00:15,030 --> 00:00:18,090
We know that there are a lot of different boxes that may be out there.
6
00:00:18,390 --> 00:00:23,550
There may be square boxes, round boxes, small boxes, even large boxes and so on.
7
00:00:23,570 --> 00:00:23,910
Right.
8
00:00:24,060 --> 00:00:26,250
So there may be different types of boxes.
9
00:00:26,250 --> 00:00:31,980
And I just assume that you've seen some boxes in your life and you pretty much know that they are not
10
00:00:31,980 --> 00:00:32,730
all the same.
11
00:00:32,730 --> 00:00:35,640
And there are a lot of different types of them.
12
00:00:35,760 --> 00:00:36,420
Do you agree?
13
00:00:36,670 --> 00:00:40,650
So the first fact about boxes is that they have a type.
14
00:00:40,740 --> 00:00:44,100
Second, each and every box should have its own name.
15
00:00:44,520 --> 00:00:49,380
For example, imagine that you put a sticker on a box to distinguish it from other boxes.
16
00:00:49,680 --> 00:00:56,340
A sticker which represents some name for the box like shoes, box, glove box, a box for books and
17
00:00:56,340 --> 00:00:56,880
so on.
18
00:00:57,180 --> 00:01:00,520
This will help you not to mess up all the boxes when you move the house.
19
00:01:00,810 --> 00:01:07,410
And that would be the second fact for boxes, which states that boxes should also have a name.
20
00:01:07,710 --> 00:01:10,800
Now, what would be the third fact about boxes?
21
00:01:11,340 --> 00:01:15,930
We would say that each box may be empty or it may have something inside of it.
22
00:01:16,260 --> 00:01:18,060
It may have some content.
23
00:01:18,090 --> 00:01:18,510
Right.
24
00:01:18,660 --> 00:01:21,930
So we can say that there are basically two main situations.
25
00:01:21,960 --> 00:01:24,990
We can tell about the inside of a box.
26
00:01:25,380 --> 00:01:28,710
Either way, it's empty or either it has something inside of it.
27
00:01:28,890 --> 00:01:32,370
For example, a couple of your shoes, some books and so on.
28
00:01:32,610 --> 00:01:39,690
So that's the third fact which tells that boxes should either be empty or they should have some contents
29
00:01:39,690 --> 00:01:40,310
inside of it.
30
00:01:40,470 --> 00:01:45,720
And the last fact about the enology, two boxes would be that boxes should be stored somewhere.
31
00:01:46,110 --> 00:01:47,250
Simply think about it.
32
00:01:47,550 --> 00:01:50,880
If you have some box, then these boxes located somewhere.
33
00:01:50,880 --> 00:01:51,240
Right.
34
00:01:51,510 --> 00:01:56,490
Either read seeds that your living room at your sleeping room, at the kitchen or wherever it may be.
35
00:01:56,850 --> 00:01:59,050
These box should reside somewhere.
36
00:01:59,340 --> 00:02:03,360
And the place where it resides is called the address of the box.
37
00:02:03,600 --> 00:02:05,470
I mean, that makes sense, right?
38
00:02:05,790 --> 00:02:08,990
And this address may be represented in different ways.
39
00:02:09,000 --> 00:02:14,670
For example, if we take a look at our analogy, we can say that a box is addressed would be something
40
00:02:14,670 --> 00:02:17,150
similar to your house address.
41
00:02:17,260 --> 00:02:22,500
Can you specify where you live in some countries, state, series, street and so on.
42
00:02:22,710 --> 00:02:25,740
So just like you specify your address where you live.
43
00:02:26,190 --> 00:02:27,690
The same goes for boxes.
44
00:02:27,780 --> 00:02:29,820
Each box has some address.
45
00:02:30,180 --> 00:02:36,300
Now, once we've introduced the correct the mistakes of boxes, it will be much but much more easier
46
00:02:36,300 --> 00:02:38,690
for us to learn water variables.
47
00:02:39,150 --> 00:02:41,060
In fact, that should be so easy.
48
00:02:41,070 --> 00:02:47,760
You'll be amazed how much these scary variables that you may or may not have heard of resembled these
49
00:02:47,760 --> 00:02:49,800
simple boxes we've just mentioned.
50
00:02:50,310 --> 00:02:55,680
So all of these stories, all of this analogy we've just introduced a minute ago is very similar to
51
00:02:55,680 --> 00:02:57,700
how we can categorize variables.
52
00:02:57,990 --> 00:03:02,700
So just like boxes, we can say that variables can be of different types.
53
00:03:03,150 --> 00:03:08,580
We've said that there are different types of boxes in which you're going to put your box or your shoes.
54
00:03:09,030 --> 00:03:13,890
So basically for a different type of things, different type of stuff, you're going to use different
55
00:03:13,890 --> 00:03:15,540
types of boxes, right?
56
00:03:15,930 --> 00:03:20,040
So the same goes for variables based on the type of the variable.
57
00:03:20,040 --> 00:03:26,760
We're going to be able to store different types of data like integer, real numbers, character strings
58
00:03:26,760 --> 00:03:27,550
and whatnot.
59
00:03:27,900 --> 00:03:31,640
So next we can say that the variable should have its own name.
60
00:03:31,910 --> 00:03:37,380
And we said that the variable is just sort of a box which has its own name, because we know that there
61
00:03:37,380 --> 00:03:43,380
may be multiple boxes around and we want to be able to identify them by their unique name.
62
00:03:43,890 --> 00:03:46,860
So every box has its own unique sticker.
63
00:03:47,220 --> 00:03:52,770
And in a similar way, we can say that every variable will have its own unique name.
64
00:03:52,950 --> 00:03:56,850
Now, which variable may also have some content inside of it?
65
00:03:57,240 --> 00:04:01,530
Just like you can pack a pair of shoes, shirts or even vegetables in a box.
66
00:04:01,920 --> 00:04:05,010
Similarly can be done in variables.
67
00:04:05,460 --> 00:04:10,590
You can simply put some contents, some value inside a variable.
68
00:04:10,860 --> 00:04:14,640
That's the whole point of variables to hold some value inside of it.
69
00:04:14,880 --> 00:04:20,700
Now, each variable may have some content inside of it, just like you can pack a pair of shoes, shirts
70
00:04:20,700 --> 00:04:22,380
or even vegetables in a box.
71
00:04:22,710 --> 00:04:26,370
Similarly, you can put some contents inside a variable.
72
00:04:27,150 --> 00:04:30,840
That's the whole point of variables to hold some value inside of them.
73
00:04:31,140 --> 00:04:34,710
The variable contents is sometimes also called its value.
74
00:04:34,860 --> 00:04:36,360
The variables of value.
75
00:04:36,510 --> 00:04:41,970
And lastly, we also know that a variable should have some address where it will reside.
76
00:04:42,000 --> 00:04:42,420
Right.
77
00:04:42,900 --> 00:04:44,160
We need to have an address.
78
00:04:44,210 --> 00:04:50,280
Some place usually should be a unique place where the variable is going to be stored.
79
00:04:50,520 --> 00:04:55,260
So now you know, the top four features you should be familiar with regarding variables.
80
00:04:55,520 --> 00:04:59,880
And in the next short section, you're going to be introduced with the process.
81
00:05:00,160 --> 00:05:03,540
Using these variables in your programming language.
82
00:05:03,840 --> 00:05:05,550
So without any further talking.
83
00:05:05,610 --> 00:05:07,770
Let's move on to the next video.
7966
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.