Page 63 - ipp11
P. 63

(a)  Write a query to display names of customers who gave a rating of 5.
                (b)  Write a query to display all feedback entries whose Feedback ID is less than F104.
                (c)  Write a query to display name and product for feedback given on or before April 20, 2025.


                                                Section D (4 × 4 = 16 Marks)
            32.  (a)  Write a Python program to check whether a given string is a palindrome or not. (Ignore case and spaces)

                                                                                                            [4]
                                                           OR
                (b)  Write a menu-driven Python program to perform the following arithmetic operations.
                    The menu should display the following:
                    (i)  Sum
                    (ii)  Difference
                   (iii)  Product
                   (iv)  Division
                    (v)  Modulus
            33.  Predict the output of the following Python code.                                           [4]

               tup1 = (10, 20, 30, 40, 50)
               print("Element at index 2:", tup1[2])
               print("Last element:", tup1[-1])
               print("Tuple slice tup1[1:4]:", tup1[1:4])
               print("Length of tuple:", len(tup1))
            34.  Write a Python program to store teachers’ information like teacher id, teacher name and subject in a dictionary
               and display information on the basis of teacher id.                                           [4]
                                                           OR
                Predict the output of the following Python code.

               d = {'a': 100, 'b': 200, 'c': 300}
               print("Keys:", list(d.keys()))
               print("Values:", list(d.values()))
               print("Items:", list(d.items()))
               print("'b' in dictionary:", 'b' in d)
            35.  Consider the following tables:                                                             [4]
                                                     Table: Hospitals

                      Hospital_ID                Name                    City                  Capacity
                          H01           Lifeline Hospital                Delhi                   150
                          H02           Sunrise Clinic                  Mumbai                    80
                          H03           City Care Multispeciality       Chennai                  200
                          H04           Green Valley Hospital           Kolkata                  120
                                                      Table: Doctors
                       Doctors_ID                Name                 Hospital_ID            Specialization
                D101                    Dr. Sneha Rathi         H01                     Cardiology
                D102                    Dr. Amit Roy            H03                     Neurology
                D103                    Dr. Kiran Malhotra      H02                     Dermatology
                D104                    Dr. Rajeev Sinha        H01                     Orthopaedics





                                                               P.9
   58   59   60   61   62   63   64   65   66