1
00:00:11,000 --> 00:00:12,000
Hello, friends.

2
00:00:12,000 --> 00:00:21,000
Today we deal with power function in Python and we will call that power function in live view for different

3
00:00:21,000 --> 00:00:24,000
operations for that purpose.

4
00:00:24,000 --> 00:00:30,000
I just go to my folder where I saved the code.

5
00:00:30,000 --> 00:00:33,000
So over here I just copy the edition code.

6
00:00:33,000 --> 00:00:44,000
So I just open my python code or python ID and in this ID, I just open my edition code.

7
00:00:45,000 --> 00:00:50,000
So as you see over here, I want to edit that code first.

8
00:00:51,000 --> 00:00:54,000
So over here, this is my edition code.

9
00:00:54,000 --> 00:01:00,000
So initially in this case, I'm not using any library, inbuilt library.

10
00:01:00,000 --> 00:01:04,000
So over here this is my result is equal to zero in each value.

11
00:01:04,000 --> 00:01:06,000
Define power.

12
00:01:07,000 --> 00:01:11,000
Let's say P oh this is my function.

13
00:01:11,000 --> 00:01:22,000
And over here I require x and y and I want to use operator for power is x rays to y.

14
00:01:22,000 --> 00:01:26,000
So okay, so let's say I want to check the result.

15
00:01:26,000 --> 00:01:32,000
So print result of the function.

16
00:01:35,000 --> 00:01:46,000
As you see over here and let's say I want to check for a value we power brackets and the values are

17
00:01:46,000 --> 00:01:47,000
to raise to three.

18
00:01:47,000 --> 00:01:48,000
Let's see.

19
00:01:48,000 --> 00:01:50,000
So it will give me eight.

20
00:01:50,000 --> 00:01:53,000
So I just save it eight on the button.

21
00:01:55,000 --> 00:01:56,000
So let's check.

22
00:01:56,000 --> 00:01:59,000
As you see, I got eight to raise to three.

23
00:01:59,000 --> 00:02:04,000
So right now, I just minimize this, close this.

24
00:02:05,000 --> 00:02:06,000
I already save this.

25
00:02:06,000 --> 00:02:14,000
So I just go to my pi code folder and over here I want to change the sub by.

26
00:02:14,000 --> 00:02:16,000
So rename it.

27
00:02:16,000 --> 00:02:17,000
Copy this.

28
00:02:18,000 --> 00:02:26,000
Go to sub vi or here we have to change the addition to power.

29
00:02:26,000 --> 00:02:30,000
As you see, it will call the power dot by python code.

30
00:02:31,000 --> 00:02:36,000
And over here, I also want to edit this icon in place of addition.

31
00:02:36,000 --> 00:02:40,000
I just use P or W power.

32
00:02:40,000 --> 00:02:43,000
Okay, so just save it.

33
00:02:44,000 --> 00:02:45,000
Close it.

34
00:02:45,000 --> 00:02:49,000
Just go to the and over here.

35
00:02:49,000 --> 00:02:56,000
I just copy, paste it and over here rename it.

36
00:02:56,000 --> 00:03:05,000
Let's say B or W underscore two because I use two variables in this case.

37
00:03:05,000 --> 00:03:09,000
So over here this is my vi.

38
00:03:11,000 --> 00:03:12,000
Ignore it.

39
00:03:13,000 --> 00:03:14,000
Control t.

40
00:03:15,000 --> 00:03:18,000
And over here I want to call the sub value of power.

41
00:03:18,000 --> 00:03:28,000
And also I want to just change the name of function p or w e r power is my function as you see over

42
00:03:28,000 --> 00:03:28,000
here.

43
00:03:28,000 --> 00:03:34,000
And I want to call the sub vi from over here.

44
00:03:35,000 --> 00:03:40,000
So I just copy this and.

45
00:03:43,000 --> 00:03:47,000
Put it over here, connect it.

46
00:03:49,000 --> 00:03:51,000
So right now, the code is ready.

47
00:03:51,000 --> 00:03:53,000
So let's check the results.

48
00:03:54,000 --> 00:03:57,000
So over here, the symbol is power.

49
00:03:57,000 --> 00:04:03,000
So X and do Y, it will give me.

50
00:04:04,000 --> 00:04:08,000
Okay, so let's say this is my two and Y is three.

51
00:04:08,000 --> 00:04:10,000
So let's check the output.

52
00:04:11,000 --> 00:04:19,000
So as you see, I got eight if I want to check for three days, two, three, 27 four is two 364.

53
00:04:19,000 --> 00:04:21,000
So my code is working.

54
00:04:21,000 --> 00:04:30,000
This is how you can use power function in python and how we can call this n left you.

55
00:04:30,000 --> 00:04:32,000
So thank you.

