Page 64 - ipp11
P. 64

Write  SQL  queries for (a) and  (b)  and  write the outputs  for (c)  to (e) on  the basis  of  tables  Hospitals  and
               Doctors.
                (a)  Write a query to add a column Experience (in years) to the table Doctors.
                (b)  Write a query to display names of doctors who work in hospital H01.
                (c)  SELECT * FROM Hospitals WHERE Capacity > 100;
                (d)  SELECT Name, Specialization FROM Doctors WHERE Hospital_ID = 'H03';
                (e)  SELECT Name FROM Hospitals WHERE City = 'Mumbai';


                                                Section E (2 × 5 = 10 Marks)
            36.  Answer the following questions:                                                        [1+2+2]
                (a)  Draw a flowchart to find the smallest of two numbers.
                (b)  Write a Python program to print the following pattern:
                   *
                   **
                   ***
                   ****
                (c)  Write a Python program to print the reverse of a number inputted by the user.
            37.  (a)  Write a menu-driven Python program to perform the following dictionary operations:    [5]
                    (i)  Add a key-value pair
                    (ii)  Update a value for an existing key
                   (iii)  Delete a key-value pair
                   (iv)  Display the dictionary
                    (v)  Exit
                                                           OR
                (b)  Write a menu-driven Python program to perform the following tuple operations:
                    (i)   Create a tuple
                    (ii)  Access an element by index
                   (iii)  Count occurrences of a value
                   (iv)  Find index of a value
                    (v)  Exit


































                                                       P.10
   59   60   61   62   63   64   65   66