Page 432 - Ai_417_V3.0_C9_Flipbook
P. 432

Ready                                                                         5







              Answer the following questions:
                  1.  Create a Python list with the elements 1, 2, and 3 and replace the second element with 'Python'. Also, add element 5 at
                    the end of the list.

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                     ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                     ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                  2.  Write a Python program that reverses a given sentence. For example, if the input is "Hello, World!", the program should
                    output "!dlroW ,olleH".

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                     ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..
                     ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                     ……………………….……………………….……………………….……………………….…………………......................…….………………………………………..

                    430     Touchpad Artificial Intelligence (Ver. 3.0)-IX
   427   428   429   430   431   432   433   434   435   436   437