 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can check whether a number is positive, negative or zero using nested if in python. Before starting you can note my information. You can subscribe my youtube channel by clicking on the link which is available on bottom right corner of this video. You can download my app Tech MS that is available on Google Play. Now coming on to the topic. In this video I will be demonstrating how you can implement nested if to check whether the entered number is positive, negative or zero. For that purpose I am declaring a variable num to receive input from user. I am using input function. I have entered a text enter a number which will be displayed on output screen and the entered number will be stored inside num. As python reads all the numbers in string format. So we have to convert it into integer using this statement. Now I have to implement nested if. First I am checking number greater than equals to zero. Then inside if I am implementing another if whose condition is num greater than zero and I am printing number is positive. In its else I am printing number is zero. I did it because in first if I am checking number is greater than equals to zero. If it is true it means number is zero or greater than zero. Then I checked whether it is greater than zero or zero with this second if. So this is nested if formation. Suppose this first if condition is false. Number is not equals to zero or not greater than zero. Then number is less than zero. Now I can implement else for this if here and I am printing number is negative. This way you can implement nested if to check whether the entered number is positive negative or zero in python. I have saved this code in D drive inside the practice folder inside practice folder. This is saved with test script name for execution. I am opening command prompt here. I am shifting into D drive. Then inside practice folder using cd command. Now I am typing python space test script dot py and I am pressing enter key. It is asking for a number. I am entering 21st. You can see it is showing number is positive because 20 is a positive number. Now again I am executing same script. This time I am entering minus 20. You can see the output. It is showing number is negative. Again I am executing same script and I am entering zero. You can see it is showing number is zero. Friends this way you can implement a code in python which will check whether the number is negative positive or zero with the help of nested if you can implement this code at your own so that you can understand it is working. If you want to subscribe my youtube channel you can click on the link which is available bottom right corner. You can download my app tech image that is available on google play. So keep connected with me if you want to learn programming. Thank you for watching this video.