1
00:00:00,480 --> 00:00:07,410
In this section, we shall introduce a Python programming language and then we will start with variable

2
00:00:07,410 --> 00:00:13,650
types and basic operators for the variable types and the python programming language.

3
00:00:13,770 --> 00:00:22,200
We have numbers, strings, lists, tuples and dictionaries, and for the basic operators we have arithmetic

4
00:00:22,200 --> 00:00:30,870
operators like plus negative divided by modulo floor exponential.

5
00:00:31,560 --> 00:00:37,800
And for the comparison operators, we have this assignment operators this, membership operators this

6
00:00:38,010 --> 00:00:40,710
and I don't know the operation operators this.

7
00:00:41,070 --> 00:00:42,060
So let's get started.

8
00:00:43,290 --> 00:00:47,770
Let's consider this variables which are created in Python.

9
00:00:48,000 --> 00:00:54,090
We don't need to explicitly give the type of variable we are creating and many other programming languages.

10
00:00:54,450 --> 00:00:58,740
You may have to see, for example, and the variable name.

11
00:01:00,430 --> 00:01:02,650
Equals C six.

12
00:01:03,400 --> 00:01:08,380
And if you take this variable name to B equals a string later on.

13
00:01:10,940 --> 00:01:12,050
It's not going to work.

14
00:01:14,400 --> 00:01:15,420
Now in Python.

15
00:01:15,930 --> 00:01:17,400
This is not necessary.

16
00:01:17,730 --> 00:01:20,340
All you need to do is just give it a variable name.

17
00:01:20,670 --> 00:01:23,460
So in this case, we have the variable name equals six.

18
00:01:23,730 --> 00:01:29,130
We can have a variable save our two equals this string.

19
00:01:29,490 --> 00:01:33,280
We can have another variable var three equals.

20
00:01:33,300 --> 00:01:34,270
See this list?

21
00:01:35,340 --> 00:01:36,600
We could have this list.

22
00:01:41,950 --> 00:01:49,780
And we could have on a variable save our for which is a dictionary so we could have this we're going

23
00:01:49,780 --> 00:01:50,140
to have.

24
00:01:52,280 --> 00:01:52,790
One.

25
00:01:53,390 --> 00:01:54,290
We'll give you one.

26
00:01:55,310 --> 00:01:56,420
We have yet to.

27
00:01:58,550 --> 00:02:07,280
And so no matter what we assign to a variable, the variable automatically gets its type from what is

28
00:02:07,280 --> 00:02:07,940
assigned to.

29
00:02:09,560 --> 00:02:14,870
And then just like any other programming language, we will pin our data to the user.

30
00:02:15,050 --> 00:02:17,630
So yeah, for example, we could bring out variable name.

31
00:02:18,110 --> 00:02:19,800
So we have variable name.

32
00:02:20,900 --> 00:02:21,710
And there we go.

33
00:02:22,670 --> 00:02:28,520
So we print out this variable name and it and variable name equals six pin out actually six.

34
00:02:29,150 --> 00:02:36,770
Now the other ways to format in this print function, you could put a message before the variable name

35
00:02:36,770 --> 00:02:42,350
so you could have here the name of this variable.

36
00:02:44,330 --> 00:02:46,070
You can see the content.

37
00:02:47,020 --> 00:02:51,970
Of this variable is equals this.

38
00:02:52,330 --> 00:02:56,980
So this message is in this double quotes.

39
00:02:57,310 --> 00:03:01,630
And then we have a comma followed by the variable name.

40
00:03:02,080 --> 00:03:05,410
And once we do this, we're going to have this message, which is this.

41
00:03:05,680 --> 00:03:09,070
So we have this bag which is coming from this.

42
00:03:10,240 --> 00:03:13,930
String here, and then the variable name follows.

43
00:03:14,260 --> 00:03:21,820
And since the values start in this variable, variable name is actually equal, six six is printed out.

44
00:03:22,510 --> 00:03:24,700
Now there are also ways of formatting this.

45
00:03:25,270 --> 00:03:32,890
You could have, for example, the content ease and you could do this.

46
00:03:33,040 --> 00:03:40,690
So you have this curly braces and then here you have that format instead of this comma, you could put

47
00:03:40,840 --> 00:03:41,860
that format.

48
00:03:42,250 --> 00:03:44,410
So we have the format variable name.

49
00:03:45,880 --> 00:03:49,840
So we could have the content is of this variable.

50
00:03:50,830 --> 00:03:52,090
Now let's take this away.

51
00:03:52,900 --> 00:03:59,950
Let's take this is and now you find that this is going to be replaced with this variable name.

52
00:04:01,150 --> 00:04:01,810
So there we go.

53
00:04:01,810 --> 00:04:04,150
The content is six of this variable.

54
00:04:04,510 --> 00:04:13,300
So because we put this curly braces and yeah, we put this format, that format, we have the variable

55
00:04:13,300 --> 00:04:15,730
name in and that follows.

56
00:04:16,210 --> 00:04:22,720
So we could always do this, we could have this other curly braces and then we just make sure we put

57
00:04:22,720 --> 00:04:23,710
it in this order.

58
00:04:23,920 --> 00:04:27,760
So yeah, for example, we could put var two and there we go.

59
00:04:27,850 --> 00:04:30,880
So the content is six comma string of this variable.

60
00:04:31,420 --> 00:04:33,340
All of this variables.

61
00:04:36,190 --> 00:04:42,070
So that it could also continue, but in this is making sure we keep the order.

62
00:04:42,190 --> 00:04:49,900
So yeah we have for example viral for so we have the content is six string and this of this variables.

63
00:04:50,470 --> 00:04:52,870
So that's actually how we format the sprint.

64
00:04:53,290 --> 00:05:01,960
And the sprint is very helpful as it not only helps us see this data, but is very helpful to in debugging

65
00:05:01,960 --> 00:05:04,270
your functions, whatever program you're writing.

66
00:05:06,190 --> 00:05:09,910
Now let's come back and look in more detail on this numbers.

67
00:05:10,660 --> 00:05:18,250
We're going to look at the end and the float as these are the two most common type of numbers which

68
00:05:18,250 --> 00:05:19,690
are all working within this course.

69
00:05:21,040 --> 00:05:32,080
What could declare an end like see number equals five and we have number C one.

70
00:05:32,470 --> 00:05:36,550
Let's take this a bit to a yeah, we have number one equals five.

71
00:05:36,640 --> 00:05:38,650
This number equals 8.0.

72
00:05:39,340 --> 00:05:45,070
Now, once you have this, you automatically seeing that this variable that the of itself type float.

73
00:05:45,550 --> 00:05:50,080
And once you have this, you're automatically saying this variable is of that int.

74
00:05:50,350 --> 00:05:52,450
So this is an integer and this is a float.

75
00:05:53,080 --> 00:05:58,600
It could also have a long and a complex number, but we shall work with this on this now.

76
00:05:59,620 --> 00:06:02,080
So bringing this out, we have print.

77
00:06:06,290 --> 00:06:14,120
The number one is this and the number?

78
00:06:16,570 --> 00:06:18,310
So is that.

79
00:06:20,220 --> 00:06:28,020
So for mine in this, we have number one and number two.

80
00:06:29,670 --> 00:06:30,300
So there we go.

81
00:06:30,300 --> 00:06:33,270
The number one is five and the number two is 8.0.

82
00:06:34,080 --> 00:06:38,760
Then the second variable that we should have a working on is the string for strings.

83
00:06:40,020 --> 00:06:45,810
It also tries to define it with this double quits.

84
00:06:45,840 --> 00:06:48,600
So while as we have this, we could see our string.

85
00:06:48,900 --> 00:06:50,430
Could see our string.

86
00:06:50,670 --> 00:06:55,410
Is this in the double quotes?

87
00:06:56,790 --> 00:06:57,570
And there we go.

88
00:06:58,110 --> 00:06:59,810
Now we thought, okay, yeah.

89
00:06:59,820 --> 00:07:01,800
We're supposed to give this the equal sign.

90
00:07:02,670 --> 00:07:03,270
So reloaded.

91
00:07:03,270 --> 00:07:05,910
And we have this Oracle print out string.

92
00:07:07,480 --> 00:07:08,710
So we have the string.

93
00:07:09,100 --> 00:07:12,160
And now what if we're interested in just getting this first element?

94
00:07:12,730 --> 00:07:14,080
Finding this first element?

95
00:07:14,290 --> 00:07:20,560
We have to know that in the pattern programming language, just like many other languages, we start

96
00:07:20,890 --> 00:07:23,890
having this index from zero instead of one.

97
00:07:24,250 --> 00:07:28,630
So if we're looking for the first element, we're going to have to select the index zero.

98
00:07:28,900 --> 00:07:32,710
And to select this index, we have to use the square brackets.

99
00:07:33,460 --> 00:07:38,320
So we have a string of zero which gives us this.

100
00:07:38,530 --> 00:07:38,920
Oh.

101
00:07:40,210 --> 00:07:46,090
Now, if you are looking for this element of this, dear, we could count zero one, two, three.

102
00:07:46,120 --> 00:07:53,380
The space is also a character, so we have zero one, two, three, four, five, six, seven, eight,

103
00:07:53,380 --> 00:08:03,100
nine, ten, 11, 12, 13, 14, 15, 16, 17, 18, nine, 20, 21, 22, 23, 24, 25, 26.

104
00:08:03,520 --> 00:08:06,940
So we place this between the six and we have the.

105
00:08:07,450 --> 00:08:11,800
And that's exactly what we do to get whatever character we have in the string.

106
00:08:12,790 --> 00:08:16,240
Now, if you're interested in getting the portion of a string C interesting.

107
00:08:16,300 --> 00:08:17,680
Get in this position from this.

108
00:08:17,680 --> 00:08:23,350
Oh, to say this, you would have to use this notation.

109
00:08:23,710 --> 00:08:31,150
So yeah, since this is zero one, two, three, four, five, six, seven, eight, nine.

110
00:08:31,390 --> 00:08:34,510
So we'll start from the zero index to the ninth index.

111
00:08:34,750 --> 00:08:41,920
So what we do is we have zero we have this column and then we have ten.

112
00:08:42,730 --> 00:08:47,650
So since we're moving from zero to the ninth index, we go from zero right up to ten.

113
00:08:48,100 --> 00:08:55,330
Now, actually, what happens in Python is if you wanted to go from zero to N, so if you want to go

114
00:08:55,330 --> 00:09:03,190
from zero to C and you have to index from zero to end plus one.

115
00:09:04,150 --> 00:09:10,780
So here you're going to have the string output it, but it's going to go from zero right up to ten minus

116
00:09:10,780 --> 00:09:11,110
one.

117
00:09:11,490 --> 00:09:13,610
I You could consider it like this.

118
00:09:13,750 --> 00:09:19,210
If this is confusing, you could say if you want to go from zero to n minus one, you index from zero

119
00:09:19,210 --> 00:09:19,690
to end.

120
00:09:19,990 --> 00:09:25,720
So that index and this way you show that you're going to have all the elements from zero to n minus

121
00:09:25,720 --> 00:09:25,990
one.

122
00:09:26,500 --> 00:09:31,660
Now index and like this, you're going to have all the elements from 0 to 9.

123
00:09:31,840 --> 00:09:33,790
So in this case, we're going to print.

124
00:09:35,370 --> 00:09:39,840
String zero string one string two string theory string forcing five.

125
00:09:39,840 --> 00:09:41,640
String six string seven.

126
00:09:41,640 --> 00:09:43,230
String eight, answering nine.

127
00:09:43,680 --> 00:09:45,690
So let's bring this out and see for ourselves.

128
00:09:46,170 --> 00:09:47,810
So exactly what we expected.

129
00:09:48,360 --> 00:09:55,530
Now we have this our string up to this not as furious because this may be because of this piece or less

130
00:09:55,530 --> 00:10:01,560
furiously could be reassured that what we have here is going to come 0 to 9 and then we go, we have

131
00:10:01,560 --> 00:10:08,130
this position and now we've add one element we have from 0 to 10.

132
00:10:09,150 --> 00:10:10,380
So let's maintain this.

133
00:10:11,580 --> 00:10:16,860
Now, if you're interested in getting all the elements before then you could just do this and you have

134
00:10:16,860 --> 00:10:18,990
this if you are interested in getting all that.

135
00:10:18,990 --> 00:10:22,740
I mean, before C 15 or 18, you could have this.

136
00:10:23,580 --> 00:10:27,090
So no need to give the initial index.

137
00:10:27,540 --> 00:10:34,020
Now let's say we want to get from the ninth index to the 18 minus warmth index.

138
00:10:34,270 --> 00:10:41,940
You're going to have nine now, unlike this and an index because we have this starting index, which

139
00:10:41,940 --> 00:10:43,050
is in this case, a zero.

140
00:10:43,380 --> 00:10:47,490
We have that index and we have an index.

141
00:10:48,790 --> 00:10:52,630
Generally we are taking these elements from that index.

142
00:10:54,060 --> 00:10:54,420
Who?

143
00:10:55,350 --> 00:10:56,400
An index.

144
00:10:59,630 --> 00:11:00,390
Minus one.

145
00:11:01,040 --> 00:11:08,090
Now, unlike the an index where we go up to any index minus one, the state index actually starts in

146
00:11:08,210 --> 00:11:09,680
whatever index we give it.

147
00:11:09,860 --> 00:11:14,810
So in this case, we're going to start with nine and end at 17.

148
00:11:15,410 --> 00:11:17,900
So let's take something easier for us to count.

149
00:11:18,560 --> 00:11:22,670
Now we'll say we start from 2 to 7.

150
00:11:23,270 --> 00:11:26,870
So in this case, we're going to start from the second index right up to this index.

151
00:11:27,200 --> 00:11:28,630
So let's do this before testing.

152
00:11:28,640 --> 00:11:30,110
So we have 012.

153
00:11:30,380 --> 00:11:31,550
We're going to start from here.

154
00:11:31,970 --> 00:11:38,420
So we're going to have two, three, four, five, six, because we have an seven minus one.

155
00:11:38,720 --> 00:11:41,120
So we have this are up to this.

156
00:11:42,080 --> 00:11:43,820
So this is what we're to bring out.

157
00:11:44,300 --> 00:11:45,470
So let's run this.

158
00:11:46,100 --> 00:11:47,450
And that's exactly what we get.

159
00:11:48,890 --> 00:11:52,250
Now, if you want to print out to the end, suffices to do this.

160
00:11:52,520 --> 00:11:55,730
Once you do this, you start from the second index right up to the end.

161
00:11:56,510 --> 00:11:57,290
And there we go.

162
00:11:58,010 --> 00:12:03,560
You could always find a line of the string so you could print out the line of the string.

163
00:12:04,700 --> 00:12:09,140
So we have yet dedicated to tell us that this string has 38 different characters.

164
00:12:09,650 --> 00:12:11,690
The string, too, has other functions.

165
00:12:12,290 --> 00:12:14,300
That is other simple matters.

166
00:12:14,300 --> 00:12:19,940
You could call like we have string that lower, for example.

167
00:12:22,740 --> 00:12:23,280
Doing this.

168
00:12:23,280 --> 00:12:25,980
You have this local string, that opera.

169
00:12:27,580 --> 00:12:29,410
You're going to send everything to uppercase.

170
00:12:29,410 --> 00:12:31,750
So everything you're saying to uppercase.

171
00:12:32,530 --> 00:12:37,540
Let's say we had this cure so we could better understand what we're saying.

172
00:12:37,540 --> 00:12:44,950
This is a lower phonetic that occurs then to a small Q So everything's ten to lowercase, and that's

173
00:12:44,950 --> 00:12:46,000
exactly what we wanted.

174
00:12:47,020 --> 00:12:49,120
Now let's move to the next variable type.

175
00:12:50,020 --> 00:12:54,040
We're going to work with the very versatile list for list.

176
00:12:54,040 --> 00:13:00,100
For example, we're going to have list one equals C one, two, four.

177
00:13:00,940 --> 00:13:07,630
Now lists are very important, only jojoba, particularly because they can be used to model a matrix.

178
00:13:08,320 --> 00:13:14,350
Let's first start by taking the simple metrics of the simple list, which comes in as a vector.

179
00:13:15,160 --> 00:13:17,800
But then let's bring this out, let's see what we get.

180
00:13:18,040 --> 00:13:23,440
So we have list one, which is this If you interested in getting just a first element, you can have

181
00:13:23,440 --> 00:13:24,190
list zero.

182
00:13:24,830 --> 00:13:30,880
We have that, we have this and then we have that.

183
00:13:31,480 --> 00:13:36,430
Now notice that when we print three, what we have is lists in this out of range.

184
00:13:36,430 --> 00:13:39,730
And that's because this list can only take three different elements.

185
00:13:40,030 --> 00:13:40,930
I want to print this.

186
00:13:40,930 --> 00:13:46,690
We're looking for an element which is not found in this list, and that is because the list has a set,

187
00:13:46,690 --> 00:13:52,030
a number of elements it could contain, but then it lists initially having a set, a number of could

188
00:13:52,030 --> 00:13:55,690
contain doesn't mean it to contain many other elements.

189
00:13:55,960 --> 00:14:00,610
And that's why lists are very useful because they can actually change form.

190
00:14:00,610 --> 00:14:02,350
They are very, very, very versatile.

191
00:14:02,710 --> 00:14:09,930
So we could have, for example, list one that append C an element four or an element eight.

192
00:14:11,120 --> 00:14:19,750
Now you see now that this list three exists, lists are not only made of numbers, we could also have

193
00:14:19,750 --> 00:14:20,650
list made of string.

194
00:14:20,650 --> 00:14:21,880
So we have list string.

195
00:14:23,240 --> 00:14:26,060
The string equals this we have eight.

196
00:14:26,060 --> 00:14:30,770
For example, we could put this string string in list.

197
00:14:32,050 --> 00:14:35,400
We have some white stuff and there we go.

198
00:14:35,420 --> 00:14:37,580
So let's print out this string and see what we get.

199
00:14:38,570 --> 00:14:39,620
We have Listerine.

200
00:14:42,310 --> 00:14:43,660
And that's exactly what we get.

201
00:14:43,670 --> 00:14:52,810
So we find out this list and dig in whatever kind of data type we're going to have to string that up

202
00:14:52,810 --> 00:14:58,510
and see, Hey, Lou, I'm printing this.

203
00:14:58,510 --> 00:15:01,300
We find a halo has been added onto the list.

204
00:15:02,320 --> 00:15:07,480
Now, just like with the strings, you could always have some particular elements of the list selected.

205
00:15:07,510 --> 00:15:13,810
So it could take from zero to say, for example, to you're going to take the zeroth and the first index.

206
00:15:13,870 --> 00:15:17,650
And that's because we're going from that index to an index minus one.

207
00:15:17,650 --> 00:15:23,560
So in this case, we have this we'll see that we have the zero on the first element selected.

208
00:15:23,590 --> 00:15:25,540
So we have eight and this selected.

209
00:15:26,080 --> 00:15:27,910
Now let's take this three.

210
00:15:27,910 --> 00:15:31,180
For example, we have the zero to the second element selected.

211
00:15:31,180 --> 00:15:35,770
We have it this and this does exactly what we wanted.

212
00:15:36,700 --> 00:15:39,760
Noting that at this point the string.

213
00:15:42,470 --> 00:15:43,550
Is actually this.

214
00:15:44,910 --> 00:15:45,690
So there we go.

215
00:15:46,830 --> 00:15:51,570
Now, if you want to get all the elements from a certain index to the end, you simply have to, for

216
00:15:51,570 --> 00:15:58,400
example, in this to print this out, we have the elements from the second index to the end.

217
00:15:58,410 --> 00:16:01,500
So we have 012 from this right up to the end.

218
00:16:02,170 --> 00:16:04,500
Can always get the len of this list.

219
00:16:04,620 --> 00:16:07,890
Does it get a number of elements composed in the list?

220
00:16:08,400 --> 00:16:10,560
So we have Prince line.

221
00:16:12,700 --> 00:16:13,180
String.

222
00:16:15,220 --> 00:16:19,870
Daisy We have four different elements, and that's because a string of metaphor for different elements.

223
00:16:20,830 --> 00:16:26,980
We also initialize and to least as such, we could have a name to list and to list.

224
00:16:29,200 --> 00:16:30,310
Equals this.

225
00:16:30,340 --> 00:16:32,470
So we just need to put in square brackets.

226
00:16:32,470 --> 00:16:33,780
And there we go.

227
00:16:33,790 --> 00:16:36,130
We have this empty list printed out.

228
00:16:37,120 --> 00:16:38,050
Empty list.

229
00:16:39,970 --> 00:16:40,630
So that's it.

230
00:16:41,440 --> 00:16:44,110
And also, there are other ways of initializing the list.

231
00:16:44,320 --> 00:16:48,760
We could have matrix lists or vector lists.

232
00:16:50,200 --> 00:16:58,900
Vector, at least where we initialize it with all zeros, we could have zero times number of elements.

233
00:17:01,140 --> 00:17:02,880
I'm going to have dimension of vector.

234
00:17:03,510 --> 00:17:05,190
Dimension of.

235
00:17:06,760 --> 00:17:07,300
Vector.

236
00:17:08,310 --> 00:17:10,320
Where we could said dimensional vector.

237
00:17:15,450 --> 00:17:20,460
We equal c six and doing this we could print out.

238
00:17:22,710 --> 00:17:24,690
This is vector list equals this.

239
00:17:25,920 --> 00:17:27,630
And doing this we could print out.

240
00:17:29,810 --> 00:17:30,830
Vector at least.

241
00:17:35,300 --> 00:17:42,010
Now we see that this actually gives us just this list with one element zero.

242
00:17:42,020 --> 00:17:50,030
And that is because we've done this wrongly now and correcting that, we have this put outside simply.

243
00:17:50,480 --> 00:17:52,980
So we have this look at this and we're busier.

244
00:17:53,720 --> 00:18:00,050
So doing this now, we actually have the vector initialized with all zeros.

245
00:18:00,920 --> 00:18:09,140
And since this list can be changed, you can have a vector at least vector at least say zero to B equals

246
00:18:09,560 --> 00:18:10,040
nine.

247
00:18:10,730 --> 00:18:13,280
And you could print out vector list.

248
00:18:15,800 --> 00:18:18,250
We find that this has become nine.

249
00:18:21,440 --> 00:18:34,490
Now let's see how to initialize a list to a metrics we have number of Cullen's C equals four number

250
00:18:34,490 --> 00:18:43,190
of rows to be equals three and we can have this metrics list.

251
00:18:45,550 --> 00:18:49,600
Equals zero times.

252
00:18:50,110 --> 00:18:52,840
We have the number of columns.

253
00:18:54,840 --> 00:18:57,270
And then we have all this and this box.

254
00:19:00,250 --> 00:19:03,580
Times the number of rows.

255
00:19:04,930 --> 00:19:07,150
Now, let's look at this again.

256
00:19:07,540 --> 00:19:15,610
We found that in order for us to have this, that is we had this list initialized to six different elements

257
00:19:15,610 --> 00:19:17,110
with all being zeros.

258
00:19:17,470 --> 00:19:24,790
We needed to put this in the square brackets and multiply with set in constants is 6000 and variable

259
00:19:24,790 --> 00:19:25,180
six.

260
00:19:26,320 --> 00:19:33,310
Now, in this case, what we're doing here is what they can all consider in all of this to be that zero.

261
00:19:33,610 --> 00:19:35,950
And we're multiplying by this number of rows.

262
00:19:36,250 --> 00:19:37,450
So let's do this.

263
00:19:37,990 --> 00:19:40,380
And we have the print matrix.

264
00:19:40,500 --> 00:19:40,900
These.

265
00:19:43,000 --> 00:19:48,910
So while we up tenure, is this list made of these three rules?

266
00:19:49,900 --> 00:19:52,740
So we have this first rule made of the zero.

267
00:19:52,930 --> 00:19:57,790
There's zero and this other one zero and the number of rules equals three.

268
00:19:58,450 --> 00:20:03,550
Now, let's replaces zeros with what we had initially.

269
00:20:04,120 --> 00:20:12,790
So instead of this zero, we're going to be having another stuff in here, but with another list replacing

270
00:20:12,790 --> 00:20:14,260
the zero with another list.

271
00:20:14,590 --> 00:20:18,430
So as we do this, let's a matrix list.

272
00:20:19,510 --> 00:20:22,300
And this show equals this.

273
00:20:23,140 --> 00:20:34,420
So you put a zero times number of rows and then yeah, we have metrics list now which I'll see how this

274
00:20:35,050 --> 00:20:37,960
other list is going to replace all the zeros.

275
00:20:38,890 --> 00:20:39,970
Let's print this out.

276
00:20:40,240 --> 00:20:40,870
Print out.

277
00:20:43,170 --> 00:20:51,690
Metrics list initial and then print out metrics list.

278
00:20:52,740 --> 00:20:59,100
So we'll see that this list, made up of four different elements, replaces a zero.

279
00:20:59,550 --> 00:21:02,070
This other list replaces a zero.

280
00:21:02,520 --> 00:21:04,710
This other list is zero.

281
00:21:05,640 --> 00:21:12,120
And this can be seen as some sort of metrics where these are the rules of the metrics.

282
00:21:13,110 --> 00:21:16,500
So we have this rule one, rule two and three.

283
00:21:18,060 --> 00:21:25,500
Now a tuple is similar to a list, but the difference is that once it tuple is defined, it cannot be

284
00:21:25,500 --> 00:21:25,980
changed.

285
00:21:26,340 --> 00:21:28,830
So if we have this tuple, let's call it tuple.

286
00:21:28,830 --> 00:21:34,770
One equals this and instead of the square brackets, we have the symbol brackets that we have there.

287
00:21:34,800 --> 00:21:36,330
One, two, three.

288
00:21:37,200 --> 00:21:37,980
Print is out.

289
00:21:39,180 --> 00:21:40,020
Two for one.

290
00:21:41,790 --> 00:21:44,390
And then we could try to change its values.

291
00:21:44,410 --> 00:21:45,690
See to pull.

292
00:21:49,650 --> 00:21:53,630
1110 equals nine.

293
00:21:54,590 --> 00:21:55,790
Find out we have an error.

294
00:21:56,180 --> 00:22:05,150
Tip would object dozens of but item assignment so it's actually different from list and this has its

295
00:22:05,150 --> 00:22:09,050
values can't be changed so that's it.

296
00:22:10,700 --> 00:22:17,450
We also have dictionaries let's give this dictionary one equals.

297
00:22:18,380 --> 00:22:22,700
So we have this we look up at the dictionary we had defined earlier.

298
00:22:26,230 --> 00:22:27,250
We have this year.

299
00:22:32,900 --> 00:22:33,500
There we go.

300
00:22:34,610 --> 00:22:39,620
Now, to obtain some elements you could have, will print out a dictionary.

301
00:22:41,480 --> 00:22:49,670
Dictionary one to obtain the dilemma with one we have this we see clearly that wants to specify that

302
00:22:49,670 --> 00:22:56,300
we want this element was value is one it gives us a value and once we are in alignment with the values

303
00:22:56,300 --> 00:22:57,680
to it gives us this value.

304
00:22:58,250 --> 00:23:03,800
Now if you keep on doing this, you go to three, find out with two that this three doesn't exist.

305
00:23:04,070 --> 00:23:07,120
So actually, this is some sort of key value pair.

306
00:23:07,130 --> 00:23:13,990
So these are the keys and these are the values keys and the values that set.

307
00:23:13,990 --> 00:23:22,130
Let's look at the python operators we have there from operator, the IS operator, assignment operator,

308
00:23:22,130 --> 00:23:24,950
the membership operator and the identity operators.

309
00:23:25,640 --> 00:23:27,590
So let's look at arithmetic operators.

310
00:23:28,130 --> 00:23:31,630
We're going to have a variable E equals five.

311
00:23:32,120 --> 00:23:34,610
We have B equals seven.

312
00:23:36,410 --> 00:23:45,230
Would have C equals or would take this at, let's say, adequacy plus B this is subtract.

313
00:23:46,550 --> 00:23:50,390
Subtract equals E minus b c divide.

314
00:23:52,570 --> 00:23:54,250
He goes a debate about b.

315
00:23:54,880 --> 00:23:56,920
C we have.

316
00:23:58,780 --> 00:24:12,760
Power equals e to the power of b we have modulo which is equals e modulo b so we have m would be we

317
00:24:12,760 --> 00:24:21,070
have lower divide because we divide it by B and now we could bring all of this.

318
00:24:21,070 --> 00:24:22,360
So we have bring add.

319
00:24:26,320 --> 00:24:27,250
Bring subtract.

320
00:24:27,760 --> 00:24:29,440
Now let's changes of, say, 15.

321
00:24:29,860 --> 00:24:31,900
So we have been add, bring, subtract.

322
00:24:36,370 --> 00:24:37,540
Print divide.

323
00:24:42,120 --> 00:24:42,720
Power.

324
00:24:52,300 --> 00:24:53,230
Lower divide.

325
00:24:54,890 --> 00:24:55,460
There we go.

326
00:24:56,780 --> 00:25:03,200
So let's get the answers we have for this first case will simply add this two variables 15 and 17,

327
00:25:03,200 --> 00:25:04,870
and obviously it gives us 22.

328
00:25:05,300 --> 00:25:07,550
The next we subtract, the next we divide.

329
00:25:07,960 --> 00:25:09,530
And that's why we have this float.

330
00:25:09,980 --> 00:25:11,690
The next would take to the power.

331
00:25:11,720 --> 00:25:13,550
So we have 15 to the power of seven.

332
00:25:13,820 --> 00:25:15,050
This gives us this number.

333
00:25:15,470 --> 00:25:16,880
The next we have the modulo.

334
00:25:17,120 --> 00:25:19,760
Now 15 what seven is actually equals one.

335
00:25:20,090 --> 00:25:26,380
And that's because 15 divided by seven is equals two.

336
00:25:26,480 --> 00:25:27,360
Remember one.

337
00:25:27,980 --> 00:25:31,640
And we know that what a moment is actually what interests us.

338
00:25:32,540 --> 00:25:38,870
So that's why here we have a one and the lower divide actually collects this.

339
00:25:39,080 --> 00:25:44,780
So once we divide this, this is a lower divide, and then this is a more.

340
00:25:46,160 --> 00:25:48,200
So that's why here we have one yet to.

341
00:25:49,240 --> 00:25:52,460
Now, let's look at the others for a comparison.

342
00:25:52,460 --> 00:25:58,100
Operators we shall look at is minded, the one we shall be doing with conditions.

343
00:25:58,610 --> 00:26:00,230
Let's look at the assignment operators.

344
00:26:01,430 --> 00:26:05,840
For this, you could have c e equals eight.

345
00:26:06,560 --> 00:26:09,350
You have B equals five.

346
00:26:09,980 --> 00:26:15,470
And then you wanted to see at C equals C plus E.

347
00:26:16,220 --> 00:26:22,030
Now if you have this all elastic B, there's a, B equals B plus E.

348
00:26:23,880 --> 00:26:30,290
Now, if you print b C that you have 30 and that's because A's eight and B is five.

349
00:26:30,950 --> 00:26:34,670
Now, instead of doing this, you could replace this with plus equals.

350
00:26:35,300 --> 00:26:37,040
So doing this gives the same answer.

351
00:26:37,430 --> 00:26:39,620
So this plus equals is actually equals.

352
00:26:39,950 --> 00:26:43,280
All this is the same as doing this, this plus this.

353
00:26:43,280 --> 00:26:47,210
So B's equals B plus e is the same as the can this.

354
00:26:47,660 --> 00:26:54,020
So if you want to subtract now, if you want to have B equals itself minus any other variable, you

355
00:26:54,020 --> 00:26:58,220
could simply do this for the multiplication this and for the division that.

356
00:26:59,300 --> 00:26:59,930
So that's it.

357
00:27:02,800 --> 00:27:08,140
Now let's look at the next we have for this other operators.

358
00:27:08,140 --> 00:27:09,670
We shall see this one.

359
00:27:09,670 --> 00:27:12,610
We should be working with the conditions and the loops.

360
00:27:13,510 --> 00:27:16,870
So that's it for this section on variable types and basic operators.
