Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 164 - 2607_Traclpad_Pro_5.1_flipbook_C8
P. 164

    5.  Long answer type questions.                                                                   3×3=9
                        a. Discuss the benefits of using functions in Python to manage complex programs. Illustrate your
                           explanation with an example of a function that performs a specific task.

                        b. What is the importance of data in the context of AI? Give examples of AI applications based on
                           data.
                        c. Mention any four challenges faced while establishing smart cities.
                     6.  Do as Directed.                                                                            4×2.5=10

                        a. Write a Python function named calculate_area that takes the shape type (“circle”, “rectangle”,
                           “triangle”) and dimensions (e.g., radius, length, and width) as parameters and returns the
                           area of the shape.
                        b. Create a Python program that initialises a list with five elements, appends a new element, and
                           then prints the updated list.
                        c. Consider the following list: L = [3, 5, 7, 9, 12, 15]. Write the Python code to find the position of the
                           even number in the given list.

                        d. You have two lists of colours: primary_colours = [‘red’, ‘blue’] and secondary_colours = [‘green’,
                           ‘orange’]. Write a program to use the extend method to add secondary_colours to primary_
                           colours.

                                                                                          Annual Examination Sample Paper  163

| 159 160 161 162 163 164 165 |