Page 131 - Plus V4 with Adobe class 7
P. 131

Test Expression      False
                                                                             Factbot

                                      True                           In Python, the non-zero value is

                                                                     interpreted as true. None and 0
                                Body of if                           are interpreted as false.






                          Statement just below if







             Program 1: To check whether a given number is positive






















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

































                                                                               #Conditional Statements in Python 129
   126   127   128   129   130   131   132   133   134   135   136