Hello, everyone, thank you for coming back to the course. So this session, we mainly will talk about how we can save our code to a Python file. So that we don't have to tap in our code again and again in the interactive mode. The way to do that is to go to File, New File. And then we are going to copy and paste our existing code from our interactive actuator to our new file. So we paste it there.
And then we go to File and then safe. Here we are going to choose the desktop folder. And then we create a new folder under desktop folder. You can type any name for the folder, even in local language. And then we choose our name for our Python file. Do b m all right After that, you press f5 which will save and run our code in our Python file.
However, you can see that in our left hand side, our interactive shell, nothing is happening. This is mainly because we have only defined our function in our Python file without really executing that. It now put in pm underscore app blanket to execute our function. Oh, I press f5 say and execute. You can see that in our shell, it is happening. We put in the input and then it calculates the BMI value which is 10 2.22.
So good job. We have successfully put in the code in our Python file. So next time when we want to one RPM add, we can just bring out the Python file and execute that.