Page 57 - ipp11
P. 57

31.  Consider the following table and answer the questions that follow.                      (3)

                                                     Table: Customers
                     AccountID         Name            Balance        AccountType         Branch
                  101             Rahul            50000            Savings          Delhi
                  102             Ananya           70000            Current          Mumbai
                  103             Raj              30000            Savings          Chennai
                  104             Meera            45000            Current          Delhi

                  (a)  Write a query to display the names and balance of customers having Savings account.
                  (b)  Write a query to display the details of customers in alphabetical order of their names.
                  (c)  Write a query to display details of customers whose balance is more than 35000 and branch is Delhi.

                                               SECTION D (4 × 4 = 16 Marks)
              32.  (a)  Write a Python program to accept a three-digit number from the user and return its reverse as the
                     output.                                                                               (4)
                                                           OR
                  (b)  Write a menu-driven Python program to calculate the area of different shapes, take required inputs,
                     display results and use looping and conditional statements until the user selects Exit. The menu
                     should display the following options:
                       (i)  Area of Square
                      (ii)  Area of Circle
                      (iii)  Area of Rectangle
                      (iv)  Area of Triangle
                      (v)  Exit
              33.  Predict the output of the following Python code.                                        (4)

                 score = [100, 220, 430, 460, 510]
                 score.append(160)
                 score.insert(2, 250)
                 score.pop(1)
                 score.remove(510)
                 print(score.index(430))
                 print(score)
              34.  Write a Python program to store students’ information like admission number, roll number, name and
                 marks in a dictionary and display information on the basis of admission number.           (4)
                                                           OR
                  Predict the output of the following Python code.
                 faculty = {"Name": "Amrita", "Age": 36, "Designation": "Engineer"}
                 faculty["Department"] = "IT"
                 faculty.pop("Age")
                 print(faculty.get("Designation"))
                 print(faculty)
              35.  Consider the following tables.                                                          (4)

                                                     Table: Products
                              ProductID      ProductName        Category           Price
                           1                Laptop          Electronics      60000
                           2                Phone           Electronics      30000
                           3                Chair           Furniture        5000
                           4                Table           Furniture        8000

                                                           P.4
   52   53   54   55   56   57   58   59   60   61   62