Page 128 - TechPluse_C8_Flipbook
P. 128

Tech


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




                  Program 1:  To ask the user number of days in a leap year and display message if answer is
                               correct.



















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

























                  Program 2: To demonstrate the if statement.





















              126       Premium Edition-VIII
   123   124   125   126   127   128   129   130   131   132   133