﻿1
00:00:00,768 --> 00:00:05,632
‫So we have started this jupyter notebook from Anaconda navigator.

2
00:00:05,888 --> 00:00:11,776
‫Now to create a new notebook click on this new button in the top right corner

3
00:00:12,544 --> 00:00:14,336
‫And click on Python 3.

4
00:00:15,616 --> 00:00:17,408
‫This will open a new notebook

5
00:00:17,664 --> 00:00:18,688
‫In a new tab.

6
00:00:24,064 --> 00:00:26,624
‫This is default jupyter-notebook interface.

7
00:00:27,648 --> 00:00:31,488
‫In Notebook you write and run your quotes in a small segment

8
00:00:32,000 --> 00:00:34,560
‫And the segments are called cells.

9
00:00:36,352 --> 00:00:41,728
‫Apart from executing your code this cell can also be used for commenting

10
00:00:42,240 --> 00:00:44,288
‫And it is really helpful

11
00:00:44,800 --> 00:00:46,592
‫Make your code readable

12
00:00:46,848 --> 00:00:47,872
‫And easy to follow.

13
00:00:49,920 --> 00:00:52,992
‫To write the code you just have to click on this cell

14
00:00:53,760 --> 00:00:59,904
‫And for example to add two numbers you can just write two plus two so this is where you will write your codes.

15
00:01:00,160 --> 00:01:02,720
‫Execute this code just

16
00:01:03,232 --> 00:01:06,304
‫Press control enter.

17
00:01:09,120 --> 00:01:15,264
‫So you can write your codes in the cell and you will get the output just below it.

18
00:01:16,032 --> 00:01:17,312
‫You can see

19
00:01:17,568 --> 00:01:20,128
‫For input we have In

20
00:01:20,384 --> 00:01:25,760
‫And for all the outputs we have out.

21
00:01:26,016 --> 00:01:28,832
‫On the top you can see different menu items

22
00:01:30,624 --> 00:01:35,488
‫File contains general options like saving printing

23
00:01:35,744 --> 00:01:36,768
‫or renaming.

24
00:01:37,280 --> 00:01:41,632
‫Edit contains ####### related options

25
00:01:41,888 --> 00:01:46,240
‫Like cut cell ,copy cell, paste cell or Delete cell.

26
00:01:48,544 --> 00:01:51,872
‫View contains interface related option

27
00:01:52,384 --> 00:01:56,736
‫And insert contains option to insert new cells.

28
00:02:00,320 --> 00:02:04,416
‫cells menu item contains execution related options

29
00:02:05,184 --> 00:02:09,536
‫And as the name suggest help contains references and manuals

30
00:02:09,792 --> 00:02:11,840
‫On how to use jupyter notebook.

31
00:02:12,096 --> 00:02:15,424
‫You can also find the list of shortcuts from here,

32
00:02:22,848 --> 00:02:28,736
‫Now most of the options we are going to use are also available in the form of buttons

33
00:02:29,248 --> 00:02:33,856
‫So suppose if I want to rename this file as lecture 1

34
00:02:34,112 --> 00:02:35,392
‫I will do that

35
00:02:35,648 --> 00:02:36,928
‫By clicking on this

36
00:02:37,184 --> 00:02:41,280
‫File name and title and just rename it to lecture 1.

37
00:02:49,216 --> 00:02:52,800
‫To save this file we can click on the save button

38
00:02:55,360 --> 00:02:58,944
‫It will automatically saves your file in your default directory.

39
00:03:00,736 --> 00:03:05,344
‫Next time you open jupyter-notebook you will be able to see this file

40
00:03:05,600 --> 00:03:06,880
‫In your default directory

41
00:03:07,392 --> 00:03:09,440
‫From jupyter-notebook homepage

42
00:03:12,000 --> 00:03:15,328
‫There are also buttons to cut copy paste

43
00:03:17,376 --> 00:03:20,704
‫We also have a button to execute our quotes

44
00:03:21,472 --> 00:03:23,520
‫So again if I

45
00:03:24,544 --> 00:03:26,080
‫If I click on my cell

46
00:03:26,336 --> 00:03:28,896
‫And click on Run It will execute the same.

47
00:03:31,200 --> 00:03:35,808
‫Now you can see this drop down menu is saying code

48
00:03:36,064 --> 00:03:40,928
‫This means the cell we have selected is containing a code

49
00:03:41,696 --> 00:03:47,328
‫If I want it to contain a comment I can change it to either raw or markdown formatting.

50
00:03:49,376 --> 00:03:52,192
‫If I change it to markdown or raw

51
00:03:52,448 --> 00:03:58,592
‫our Python kernel will know that the cell the content of this particular cell is just for

52
00:03:58,848 --> 00:04:01,664
‫For commenting and it will not execute it.

53
00:04:02,176 --> 00:04:07,552
‫The presence of this feature make our code more readable and understandable.

54
00:04:08,320 --> 00:04:12,416
‫So I will go ahead and change the format of this cell to MD.

55
00:04:12,672 --> 00:04:18,815
‫Which is markdown you can see when I am changing my cell to markdown

56
00:04:19,071 --> 00:04:24,959
‫The input symbol goes away there is no input symbol here.

57
00:04:25,215 --> 00:04:28,543
‫Input symbols are present only in the front of codes.

58
00:04:29,567 --> 00:04:35,711
‫I can write anything in this empty cell and Python treat this as a comment so let's go ahead and

59
00:04:35,967 --> 00:04:37,759
‫And write this is a m d cell.

60
00:04:46,463 --> 00:04:51,327
‫Markdown cells also supports markdown formatting

61
00:04:51,839 --> 00:04:55,935
‫So if I want to give heading I can use pound symbol.

62
00:04:58,495 --> 00:05:00,799
‫So will give a heading heading 1,

63
00:05:06,431 --> 00:05:08,223
‫If I execute this

64
00:05:11,551 --> 00:05:17,695
‫You can see since I use pound symbol in front of this heading one the front for heading

65
00:05:17,951 --> 00:05:20,511
‫is the heading format.

66
00:05:22,559 --> 00:05:25,631
‫We can also use multiple pound symbol

67
00:05:26,143 --> 00:05:27,423
‫To change this size

68
00:05:27,679 --> 00:05:31,263
‫So if I use two symbols for heading 2

69
00:05:37,151 --> 00:05:43,295
‫You can see heading two is slightly smaller than heading one you can also

70
00:05:43,551 --> 00:05:49,695
‫use 3 4 5 or 6 Pounds symbol to change the size of the settings.

71
00:05:52,767 --> 00:05:54,559
‫You can also use astrick

72
00:05:54,815 --> 00:05:55,583
‫Symbol

73
00:05:56,351 --> 00:05:57,631
‫To give bullets.

74
00:05:59,423 --> 00:06:05,567
‫So if I write astrick ,if I write bullet

75
00:06:05,823 --> 00:06:06,335
‫Point

76
00:06:06,847 --> 00:06:11,455
‫This asterisk symbol will be directly converted into a bullet.

77
00:06:20,671 --> 00:06:22,719
‫If I execute it you can see

78
00:06:23,487 --> 00:06:29,631
‫The astrick symbols are now converted into bullet and we are seeing all over points in proper bullet.

79
00:06:35,775 --> 00:06:40,127
‫There are multiple features for editing markdown you can Google it

80
00:06:40,895 --> 00:06:44,479
‫And if you want you can learn more about this formatting.

81
00:06:44,735 --> 00:06:50,879
‫Again note that markdown are just for commenting your Python is not actually

82
00:06:51,135 --> 00:06:53,183
‫Executing this cell.

83
00:06:55,487 --> 00:07:01,631
‫The next cell format is raw,raw is similar to markdown but it does not support

84
00:07:01,887 --> 00:07:02,399
‫Formatting.

85
00:07:03,423 --> 00:07:05,215
‫So if you convert it to RAW

86
00:07:09,055 --> 00:07:11,871
‫You convert it to raw it will remain like this

87
00:07:12,127 --> 00:07:15,967
‫You will not be able to get formatting out of this cell.

88
00:07:16,479 --> 00:07:18,783
‫Again raw is also for commenting

89
00:07:19,039 --> 00:07:21,087
‫And Python will not execute it.

90
00:07:23,135 --> 00:07:26,975
‫Code is the format in which we write our codes

91
00:07:28,511 --> 00:07:30,815
‫And Python will only execute cells

92
00:07:31,071 --> 00:07:32,863
‫that are marked as codes.

93
00:07:33,887 --> 00:07:36,447
‫You can see the format for

94
00:07:36,703 --> 00:07:42,079
‫This cell is code therefore I can use my codes in this cell

95
00:07:42,591 --> 00:07:44,383
‫So if I write 2 + 2

96
00:07:45,407 --> 00:07:47,455
‫I can execute it

97
00:07:47,711 --> 00:07:50,527
‫Either by clicking this Run button

98
00:07:51,551 --> 00:07:55,135
‫or by pressing the shortcut key that is control enter.

99
00:07:56,159 --> 00:07:56,671
‫For now

100
00:07:57,439 --> 00:08:00,511
‫I will click on this Run button

101
00:08:01,535 --> 00:08:03,839
‫Similarly if I write 5 + 3

102
00:08:04,095 --> 00:08:10,239
‫This time I will use control enter control enter is a shortcut to run.

103
00:08:10,495 --> 00:08:11,007
‫The sun

104
00:08:11,263 --> 00:08:12,287
‫Execute the same

105
00:08:15,359 --> 00:08:16,895
‫But most of the time

106
00:08:17,151 --> 00:08:19,967
‫We also want to enter a blank cell

107
00:08:20,479 --> 00:08:21,759
‫beneath this cell

108
00:08:23,039 --> 00:08:24,831
‫In that case I can use

109
00:08:25,087 --> 00:08:30,463
‫Alt enter instead of control enter alt enter will execute the cell

110
00:08:30,975 --> 00:08:33,279
‫Also it will insert a blank cell

111
00:08:34,303 --> 00:08:38,655
‫Just below this cell so so write alt enter

112
00:08:39,935 --> 00:08:46,079
‫It has executed the cell and it is inserted a new cell a new blank cell just below

113
00:08:46,335 --> 00:08:47,103
‫this cell.

114
00:08:48,639 --> 00:08:51,199
‫Another small point I want to tell you

115
00:08:51,711 --> 00:08:52,735
‫About cell

116
00:08:52,991 --> 00:08:55,807
‫Is editable and non editable mode.

117
00:08:57,599 --> 00:09:00,159
‫So let's first insert a new cell

118
00:09:01,695 --> 00:09:03,999
‫Now if you try to write anything

119
00:09:04,255 --> 00:09:05,791
‫So if I write

120
00:09:06,047 --> 00:09:07,839
‫Start Tech Academy

121
00:09:08,095 --> 00:09:09,375
‫Nothing will happen

122
00:09:09,631 --> 00:09:10,143
‫Because

123
00:09:10,399 --> 00:09:12,959
‫This cells are not editable right now.

124
00:09:14,495 --> 00:09:15,775
‫You can also notice

125
00:09:16,287 --> 00:09:21,151
‫The colour of the cell is blue the border around this cell is blue

126
00:09:21,663 --> 00:09:24,479
‫This suggest that the cell

127
00:09:24,735 --> 00:09:27,807
‫Currently is an non editable format.

128
00:09:28,831 --> 00:09:30,111
‫If you press enter

129
00:09:31,903 --> 00:09:34,463
‫You can see the cursor

130
00:09:34,719 --> 00:09:38,559
‫Inside the cell and now the blue colour has been changed to green colour

131
00:09:39,071 --> 00:09:40,607
‫Now you can write anything.

132
00:09:41,119 --> 00:09:47,263
‫If I write start Tech Academy you can see we are able to write this in

133
00:09:47,519 --> 00:09:49,055
‫Inside a cell.

134
00:09:49,311 --> 00:09:51,871
‫This mode is editable mode

135
00:09:52,127 --> 00:09:53,663
‫If I press escape

136
00:09:55,967 --> 00:09:58,527
‫You can see the colour has been changed to blue

137
00:09:58,783 --> 00:10:02,623
‫And now we have entered a non editable mode.

138
00:10:02,879 --> 00:10:04,671
‫In non editable mode

139
00:10:04,927 --> 00:10:05,951
‫You can navigate

140
00:10:06,207 --> 00:10:11,583
‫Two different cell and if you want to edit it you have to press enter

141
00:10:11,839 --> 00:10:17,983
‫And the cursor will appear inside the cell and the cell boundary will change to green colour.

142
00:10:19,263 --> 00:10:21,055
‫This two shortcuts

143
00:10:21,311 --> 00:10:24,639
‫Of entering into editable and non editable mode

144
00:10:24,895 --> 00:10:26,175
‫Are very important

145
00:10:26,687 --> 00:10:30,271
‫And it will lay a foundation for other shortcuts as well.

146
00:10:31,039 --> 00:10:34,111
‫So Suppose if you want to change the formatting

147
00:10:34,623 --> 00:10:36,159
‫From code to markdown

148
00:10:36,927 --> 00:10:41,535
‫You can put your cell  into non editable mode so I will press escape

149
00:10:42,815 --> 00:10:45,887
‫And then I will press M

150
00:10:47,679 --> 00:10:50,239
‫M is a shortcut for markdown formatting

151
00:10:50,751 --> 00:10:53,055
‫And you can see that

152
00:10:53,311 --> 00:10:59,455
‫The cell type has been changed from court to markdown since right now I am in non editable mode

153
00:10:59,711 --> 00:11:01,759
‫I can press y

154
00:11:02,015 --> 00:11:05,343
‫To change the format of this cell to code.

155
00:11:07,903 --> 00:11:12,767
‫Now to edit the code I just have to press enter to enter into editable mode.

156
00:11:13,535 --> 00:11:17,119
‫Now again to go back to non editable

157
00:11:17,375 --> 00:11:18,911
‫press escape

158
00:11:20,703 --> 00:11:23,775
‫Now I can use shortcuts to change the cell format.

159
00:11:27,359 --> 00:11:30,943
‫If I press r i can change the format of this cell to raw

160
00:11:31,711 --> 00:11:34,783
‫And to switch back I just have to press y.

161
00:11:35,807 --> 00:11:39,391
‫This shortcuts are very handy when you are using python

162
00:11:40,159 --> 00:11:43,231
‫And it will save a lot of time for you

163
00:11:45,535 --> 00:11:46,303
‫Again

164
00:11:46,559 --> 00:11:52,447
‫Now the shortcut to insert new cell is just to enter into non editable mode

165
00:11:52,959 --> 00:11:55,519
‫Press escape if you are in editable mode

166
00:11:55,775 --> 00:11:57,055
‫and press A

167
00:11:59,359 --> 00:12:03,455
‫A will insert a blank cell above your existing cell

168
00:12:04,479 --> 00:12:09,599
‫And similarly B will enter a cell below your existing cell.

169
00:12:12,415 --> 00:12:16,511
‫So I want you to remember this 6 shortcuts first is

170
00:12:16,767 --> 00:12:18,047
‫enter

171
00:12:18,303 --> 00:12:20,607
‫To enter into editable mode

172
00:12:20,863 --> 00:12:21,887
‫of a cell

173
00:12:22,143 --> 00:12:23,935
‫Second is escape

174
00:12:24,191 --> 00:12:27,775
‫To go into the non editable mode of the cell.

175
00:12:29,055 --> 00:12:31,103
‫Third is control enter

176
00:12:31,615 --> 00:12:32,895
‫To executive

177
00:12:33,151 --> 00:12:34,431
‫Selected cell.

178
00:12:34,943 --> 00:12:35,967
‫Fourth one is

179
00:12:36,223 --> 00:12:37,247
‫Alt enter

180
00:12:38,271 --> 00:12:43,903
‫To execute your selected cell and enter a new blank cell below your cell.

181
00:12:45,183 --> 00:12:46,719
‫The fifth one is

182
00:12:47,743 --> 00:12:48,255
‫M

183
00:12:48,511 --> 00:12:54,655
‫Use of m in non editable mode It will change the cell format from code to markdown

184
00:12:55,167 --> 00:12:57,215
‫And the last one is y

185
00:12:58,495 --> 00:13:00,031
‫In the non editable mode

186
00:13:00,287 --> 00:13:03,359
‫If you press y it will change the format of your cell

187
00:13:03,871 --> 00:13:05,407
‫From raw or markDown

188
00:13:05,663 --> 00:13:06,687
‫To code format.

189
00:13:09,247 --> 00:13:10,527
‫Similarly

190
00:13:11,039 --> 00:13:17,183
‫There is one more shortcut if you want to delete your cell just press DD in non editable mode

191
00:13:17,951 --> 00:13:18,719
‫It will delete

192
00:13:19,487 --> 00:13:25,631
‫The selected cell.In the next lecture we'll cover some basic operations and python.

