Page 35 - IPP-12-2024
P. 35

Section C
              26.  Mr. Sombuddha, an HR Manager in a multinational company “Star-X World”, has created the following
                 table to store the records of employees:                                                  [3]
                                                       Table: Emp
                                   Eid    EName    Department      DOB          DOJ
                                  Star1  Dev       Sales        1994-08-28   2020-02-14
                                  Star2  Melinda   IT           1997-10-15   2021-11-19
                                  Star3  Raj       Accounts     1998-10-02   2019-04-02
                                  Star4  Michael   Sales        2000-02-17   2020-05-01
                                  Star5  Sajal     IT           2001-12-05   2018-06-13
                                  Star6  John      Accounts     1995-01-03   2019-07-15
                                  Star7  Julia     Sales        1985-11-13   2020-08-19
                  Predict the output of the following queries that he has written:
                  (i)  Select max(year(DOB)) from emp;
                  (ii)  Select ENAME from emp where month(DOJ)=11;
                  (iii)  Select length(EName) from Emp where Department=”IT”;
              27.  Write a Python code to create a dataframe with appropriate headings from the list given below:   [3]

                 ['S101', 'Amy', 70], ['S102', 'Bandhi', 69], ['S104', 'Cathy', 75],
                 ['S105','Gundaho', 82]
              28.  A relation Vehicles is given below:                                                     [3]
                                          V_no      Type     Company     Price    Qty
                                        AW125     WagonR    Maruti       250000    25
                                        J0083     Jeep      Mahindra    4000000    15
                                        S9090     SUV       Mitsubishi  2500000    18
                                        M0892     Mini van  Datsun      1500000    26
                                        W9760     SUV       Maruti      2500000    18
                                        R2409     Mini van  Mahindra     350000    15
                  Write SQL commands to:
                  (i)  Display the average price of each type of vehicle having a quantity of more than 20.
                  (ii)  Count the type of vehicles manufactured by each company.
                  (iii)  Display the total price of all types of vehicles.
                                                           Or
                  What is the difference between the order by and group by clauses when used along with a select statement?
                 Explain with an example.
              29.  Prerna received an email from her bank stating that there is a problem with her account. The email provides
                 instructions and a link, by clicking on which she can log in to her account and fix the problem. Help Prerna
                 by telling her the precautions she should take when she receives these types of emails.   [3]
                                                           Or
                  Write the names of any two common types of Intellectual Property Rights which are protected by law.
              30.  Consider the dataframe SHOP given below:                                                [3]
                                               Item       Qty       City      Price
                                     101    Biscuit       100    Delhi          10
                                     102    Jam           110    Kolkata        25
                                     103    Coffee        200    Kolkata        55
                                     104    Sauce          56    Mumbai         55
                                     105    Chocolate     170    Delhi          25
                  Write commands to:
                  (i)  Write short code to show the information having city=“Delhi”
                  (ii)  Calculate Qty* Price and assign to column ‘Net_Price’
                  (iii)  Display Items of all rows

            A.38         Informatics Practices with Python–XII
   30   31   32   33   34   35   36   37   38   39   40