Page 381 - Informatics_Practices_Fliipbook_Class12
P. 381

OR
                Predict the output of the following queries based on the table CAR_SALES given above:
                a.  SELECT LEFT(SEGMENT,2) FROM CAR_SALES WHERE FUEL= "PETROL";
                b.  SELECT (QT2-QT1)/2 "AVG SALE" FROM CAR_SALES WHERE SEGMENT= "SUV";
                c.  SELECT SUM(QT1) "TOT SALE" FROM CAR_SALES WHERE FUEL= "DIESEL";
              27. Create a DataFrame in Python from the given list:                                               [3]
                [['Divya','HR',95000],['Mamta','Marketing',97000],['Payal','IT',980000],
                ['Deepak','Sales',79000]]
                Also give appropriate column headings as shown below:

                  Name          Department                 Salary
                0 Divya                    HR                95000
                1 Mamta           Marketing                  97000
                2 Payal                    IT              980000
                3 Deepak               Sales                 79000
            28.  Write MySQL statements for the following:                                                        [3]
                a. To create a database named FOOD.
                b. To create a table named Nutrients based on the following specification:

                     Column Name          Data Type          Constraints
                       Food_Item       Varchar(20)           Primary Key
                        Calorie        Integer
            29. Richa, recently started using her social media account. Within a few days, she befriends many people she knows
               and some that she does not know. After some time, she starts getting negative comments on her posts. She also
               finds that her pictures are being shared online without her permission.                            [3]

                Based on the given information, answer the questions given below.
                a. Identify the type of cybercrime she is a victim of.
                b. Under which act, she can lodge a complaint to the relevant authorities?
                c.   Suggest her any two precautionary measures which she should take in future while being online to avoid any
                  such situations.
                                                               OR
                  Mention any three health hazards associated with inappropriate and excessive use of gadgets.
            30.  Consider the given DataFrame 'Genre':                                                            [3]
                  Type                                             Code
                0  Fiction                                         F
                1  Non Fiction                                     NF
                2  Drama                                           D
                3  Poetry                                          P
                Write suitable Python statements for the following:
                a. Add a column called Num_Copies with the following data: [300,290,450,760].
                b. Add a new genre of type 'Folk Tale' having code as "FT" and 600 number of copies.
                c.  Rename the column 'Code' to 'Book_Code'.









                                                                                     CBSE Sample Question Paper  367
   376   377   378   379   380   381   382   383   384   385   386