1
00:00:00,780 --> 00:00:06,520
So let's go to a deal and test out the packages we just installed.

2
00:00:06,540 --> 00:00:12,570
I'm going to come over here and search I.T. early and then it's over here.

3
00:00:12,990 --> 00:00:13,430
Right.

4
00:00:13,440 --> 00:00:14,900
I'll bring this here.

5
00:00:14,910 --> 00:00:21,290
So there are packages and modules modules are contained within packages.

6
00:00:21,390 --> 00:00:26,100
You can think of a package as a folder and then a module as a file.

7
00:00:26,270 --> 00:00:30,960
So importing packages are very simple you just use the import keyword with a package name.

8
00:00:31,290 --> 00:00:32,040
Let's see what I mean.

9
00:00:32,080 --> 00:00:37,740
We're not talking much so let's say we want to import the NUM Pi the NUM pay package.

10
00:00:37,740 --> 00:00:39,720
We can simply say import num pi

11
00:00:42,520 --> 00:00:43,630
like this.

12
00:00:43,660 --> 00:00:51,070
So within this package the various functions the various modules and functions that we can use.

13
00:00:51,070 --> 00:00:53,860
So for instance let's say we want to find a range.

14
00:00:53,900 --> 00:01:01,420
We have we have low an upper limit and want to get a range of numbers within this this limit we can

15
00:01:01,420 --> 00:01:04,630
use the A range function and let's see what I mean.

16
00:01:04,630 --> 00:01:08,890
And the purpose of this particular lesson is not to teach you how to use this.

17
00:01:08,890 --> 00:01:10,330
We'll get into that later.

18
00:01:10,330 --> 00:01:18,620
This is just to test our packages so I can come over here and say X equals a range a wrench a wrench

19
00:01:18,700 --> 00:01:22,200
here is within pi life of imported an umpire.

20
00:01:22,210 --> 00:01:29,140
But if I see X course in range comma 10 and this is how the range function is used an error would be

21
00:01:29,140 --> 00:01:32,790
thrown because it cannot see a range really.

22
00:01:32,800 --> 00:01:36,910
What I have to say is X because none pi dot a range.

23
00:01:36,910 --> 00:01:44,650
So let's say I come here and say X equals num Pi which is the package named dot arranged and then now

24
00:01:44,680 --> 00:01:48,410
I pass one and 10.

25
00:01:48,530 --> 00:01:49,960
Now it's done it perfectly.

26
00:01:49,970 --> 00:01:55,400
Now if I say X to print x we can see X is an array from 1 through 9.

27
00:01:55,430 --> 00:01:57,180
And this is perfect.

28
00:01:57,260 --> 00:02:04,190
So all the time if I want to use in a function within num Pi I have to start with an umpire or to this.

29
00:02:04,220 --> 00:02:09,620
So because of this we can rename the umpire to something shorter we can give it a new name and to do

30
00:02:09,620 --> 00:02:12,320
this we can say import num pi

31
00:02:16,480 --> 00:02:19,030
us and P.

32
00:02:19,090 --> 00:02:23,320
So now whenever I want to Type Num Pi I can type and P.

33
00:02:23,440 --> 00:02:27,610
So now I can see why you cause a..

34
00:02:28,410 --> 00:02:33,760
Dot a range and I can pass the same one in turn here.

35
00:02:33,760 --> 00:02:42,910
Hit enter and then hit y here and I can see why is just like X better still if I don't always want to

36
00:02:43,030 --> 00:02:50,960
add the package name and a dot I can import this a range directly and then where do they see I can see

37
00:02:50,960 --> 00:02:53,130
it from num pi.

38
00:02:53,200 --> 00:02:56,470
Now it's a similar move and speak into an actual human being.

39
00:02:56,650 --> 00:03:03,910
Python is so simple it's so plain in its language that it's easy to learn it so I can see it from num

40
00:03:03,910 --> 00:03:11,490
pi import a range sorry about that.

41
00:03:11,520 --> 00:03:12,570
I have a typo here.

42
00:03:12,570 --> 00:03:14,320
It should be a I the A.

43
00:03:14,340 --> 00:03:23,520
So I can see it from num pi import a range like this.

44
00:03:23,680 --> 00:03:27,840
So now I wouldn't need to put end dot a range or an unpaid or air range.

45
00:03:27,880 --> 00:03:40,180
I can simply call a range and I can do that by saying z equals a range 1 10 and it's perfect I can print

46
00:03:40,180 --> 00:03:46,840
c here like this and I can C C is just like Y an X right.

47
00:03:46,840 --> 00:03:55,260
So this is how to import various modules within a package or import just a package alone exit error.

48
00:03:55,270 --> 00:03:57,060
So now let's move on let's test out.

49
00:03:57,070 --> 00:04:02,060
So this here wasn't to teach you how to program num PI was just to test in pi.

50
00:04:02,260 --> 00:04:07,870
And I use this as an opportunity to show you various ways in which we can do the import.

51
00:04:07,870 --> 00:04:12,720
Now let's look at my plot lib so much put lib is an entire package.

52
00:04:12,850 --> 00:04:18,070
But we need a particular module in my plot lib known as pie plot and because of that we're going to

53
00:04:18,070 --> 00:04:20,420
use a statement similar to this.

54
00:04:20,470 --> 00:04:31,480
We can save from mut plot lib import pie plot as P L T.

55
00:04:31,480 --> 00:04:38,620
So we want to shorten the name as POTUS like this and then we hit enter and once that is done.

56
00:04:38,620 --> 00:04:46,510
Now let's see what indeed the PI plot works so we can do that by saying P L T dot plot and we can plot

57
00:04:46,540 --> 00:04:48,330
z over here.

58
00:04:48,340 --> 00:04:55,900
I just say plot and parse see here once the ice is done I can see BLT dots show and this will show the

59
00:04:55,900 --> 00:05:02,650
graph and this will verify that indeed our plot lib installation was successful.

60
00:05:03,010 --> 00:05:03,970
So hit this.

61
00:05:03,970 --> 00:05:06,200
And this indeed is the graph.

62
00:05:06,310 --> 00:05:06,860
This.

63
00:05:07,590 --> 00:05:08,110
Right.

64
00:05:08,530 --> 00:05:12,520
So now let's test the last one we also installed a side pi.

65
00:05:12,820 --> 00:05:14,560
So now let's see CI pi.

66
00:05:14,560 --> 00:05:16,390
We've tested num pi.

67
00:05:16,390 --> 00:05:18,050
We've tested my plot lib.

68
00:05:18,280 --> 00:05:19,450
Let's test side pi.

69
00:05:19,480 --> 00:05:23,630
Now we want to test with a module from side pi known as signal.

70
00:05:23,690 --> 00:05:32,450
And this is used for signal processing applications so we can see from side pi import signal.

71
00:05:33,730 --> 00:05:39,610
And over here once the import is then we can just use a simple function known as the window.

72
00:05:39,740 --> 00:05:45,970
We we can just test out a window or we'll learn about how to design our own windows such as how many

73
00:05:45,970 --> 00:05:51,510
window honey window bar let window etc. Later we just try.

74
00:05:51,510 --> 00:05:57,700
Simple example here to verify that indeed our side pi is working and we can create a variable here called

75
00:05:57,700 --> 00:06:07,270
window and we can see signal over here dot H eight and 400 windows and we can pass the number of points

76
00:06:07,300 --> 00:06:08,160
we want.

77
00:06:08,200 --> 00:06:11,350
Let's say we want to create a fifty one point one in window.

78
00:06:11,510 --> 00:06:14,110
I just hit this like this.

79
00:06:14,110 --> 00:06:15,790
It says has no attributes.

80
00:06:16,120 --> 00:06:18,330
Yeah I typed three ends.

81
00:06:18,340 --> 00:06:19,270
Sorry about that.

82
00:06:19,270 --> 00:06:19,940
Really sorry.

83
00:06:19,940 --> 00:06:20,830
Bear with me.

84
00:06:21,400 --> 00:06:31,660
So we can see a window cause signal dot HK and over here I typed three and that's why the arrow was

85
00:06:31,660 --> 00:06:38,620
given and then I passed the the window pass the number of point fifty one then just for fun this plot

86
00:06:38,740 --> 00:06:43,570
the window I see I can see P L T plot window

87
00:06:46,500 --> 00:06:52,990
and then peyote that show and indeed this is what Han in window looks like.

88
00:06:53,380 --> 00:06:59,700
So yeah we've got all the packages we need for this cause we've got num pi we've got multiple lib and

89
00:06:59,710 --> 00:07:01,270
we've got CI pi.

90
00:07:01,270 --> 00:07:08,230
So we are done with installation stuff all we have to do now is get started with some actual Python

91
00:07:08,230 --> 00:07:09,040
code.

92
00:07:09,040 --> 00:07:13,420
So this order is for this lesson and if you have any questions just send me a message or leave it in

93
00:07:13,420 --> 00:07:16,770
the questions area and I shall see in the next lesson.
