Page 86 - TP-Play_V-2.0_Book-7
P. 86

Clickipedia


              In Python, the non-zero value is interpreted as true. None and 0 are interpreted as false.



            Program 1: To check whether a given number is positive






















            On running the above program, we get the following output:
































            Program 2: To demonstrate the if statement



















             86       Play (Ver. 2.0)-VII
   81   82   83   84   85   86   87   88   89   90   91