Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 133 - 2609_Logiccode
P. 133

    Program: To display one of the two alternate messages.

                     On running the above program, you will get the following output:

                     Program: To check if the given number is lucky or not, if the given number is greater than zero
                     and is even, then print �Lucky number� else print �Not a lucky number�.

                     On running the above program, you will get the following output:

                                                                                                      More on Python  131

| 128 129 130 131 132 133 134 135 136 137 138 |