Page 61 - Touhpad Ai
P. 61

logical_not_result = not (x == y)
                   print("Logical NOT Result:", logical_not_result)
                   Output:

                   Logical AND Result: True

                   Logical OR Result: True
                   Logical NOT Result: True



                                                                                      21 st
                    AI TASK                                                          Century   #Coding & Computational Thinking
                                                                                      Skills
                  Write Python scripts for the following:
                  1.  Accept a number and display its square and cube.











                  2.  Accept the length and breadth of a rectangle. Display its area and perimeter.













                  3.  Accept principal amount, rate of interest and time period. Calculate and display simple interest.













                  4.  Predict the output:

                     print((7 + 3) - (7 + 3))

                     print(100 + 15 * 2)












                                                                                 Basic Concepts of Artificial Intelligence  59
   56   57   58   59   60   61   62   63   64   65   66