Friends who day we discussed about the continuing part of math functions or python for that purpose.
Earlier we create a code for Python.
So let's open the earlier created folder.
Or you can say the python code.
So my python code is this and this.
I just import math function and over here I define different results yet are zero or one zero or two
zero initial value.
Then I define definition power x, comma y.
In this case, I just require two variables, but in the case of sine gradient return, square root
and low, I require two variables single variables.
So I just remove this because I do not require this right now.
So I just delete this also.
And you also delete this function.
I also delete this print function and I also added this function.
So let's I also create some another function to add on to this.
So let's say I want to go for the factorial also.
So I'll just put over here.
Let's say first I want to copy this function and over here just put and over here I just put ACD factorial
and just copy this factorial code and over here I just want to paste it.
So right now my result is, let's say five and over here is five.
And over here I just copy this and paste this.
So the result, initial result over five is zero.
So right now, one function contains the variable and other functions contain only one variable X for
this type of problem.
If you want to work out, we have a solution like just close this.
Just go to the sub.
VI, as you see or hear the part for this v is I just put the math over here as in the case of earlier.
So I just use this sub by close this.
Just go to the function.
Be math.
Okay?
I just let's say copy this.
Modified function control C, control z.
Just it is the second part or advanced part of Python.
So like, let's put the VI math one over here.
I just open it.
Control D in this case, I just add on something to this part.
So first I just go to dialog box, add on simple error handler over there.
Just delete these part.
Right now this function will call for single variable and I just copy this over here and I just session
into session out error into error out just connect these functions.
I just call the same math part and I just put because I want to edit this combo box because inside this
I want to put factorial also just edit it.
So insert let's say factorial is there right now not factorial.
Factorial is not present over here.
So I just go to my the.
Call Python code python directory.
I just copy this factorial and I want to put inside the combo box control D or here I just added items.
And over here I want to just quote factorial.
Okay.
So right now, factorial is also there.
So just connect this to this.
Or you can say just create another combo box over here, connect this to this.
And over here I want to just put initial value that is zero create.
A constant or you can say you can drag and drop the zero, or you can also connect with the earlier
one.
And right now the x variable is same, let's say, or here this is my x input and I want to also go
for the second input because in the power case I need two variables.
So I just connected to this and over here this is my y output.
And over here I got the.
Net output, too.
So right now, let's check the results.
So over here, this is combo works.
And this one is the result for this.
And this one is a result for this combo box.
And over here, this is my input X and input Y.
So let's say I want to check for two, raise to three to raise to three and combo box two.
Because over here I just connect this.
So power will come over here and square root of two will be over here.
So let's run it.
As you see, the power of two raise to three.
I got eight and the square root two, I got over here.
So let's say I want to increase this 3 to 3.
I got that square root of three.
1.7.1.73.
So my code is working perfectly.
So let's say over here, I want to check the log.
The log value is this.
I want to check for the factorial.
So over here in this code there is some error because x factorial is zero, it is going zero over here.
So I want to change or I want to call the function.
So maybe some error.
So right now, stop it.
The model part.
See, I can leave.
You find that the factorial python function for me not found.
So I just go to the python cell and just check.
Browse open my python code in the document.
Python integration by math.
So over here, the old function name is fact, not factorial.
Okay, so I want to again change this to fact in the combo box.
I want to put fact in place.
So I just added this.
So over here, I want to check.
So right now, just change it.
And also in the same combo box.
Again, just change the fact.
Okay, so let's check for the same value.
So I got the value.
So let's check for the fact I got three factorial is equal to six.
It is now working.
So this is how you can work with different variables.
Like in this case I have variable functions.
The function which is depends on two variables and the function which depends on a single variable.
So this is how we can work with Python integration with view.
Thank you.