Page 33 - IPP-12-2025
P. 33

import         as plt #Statement 1
                 months = ['Jan', 'Feb', 'Mar', 'Apr', 'May']
                 rainfall = [80, 70, 60, 50, 30]
                 plt.plot(months, , marker='o') #Statement 2
                 plt.xlabel('         ') #Statement 3
                 plt.ylabel('Rainfall (mm)')
                 plt.title('        ') #Statement 4
                 plt.show()
                 (a)  Write a suitable code for the import statement in the blank space against Statement 1.
                 (b)  Refer to the graph and fill in the blank against Statement 2 with a suitable Python code.
                  (c)  Fill in the blank against Statement 3 with a suitable label for the x-axis.
                 (d)  Refer to the graph and fill in the blank against Statement 4 with a suitable Chart Title.
             34.  An  Electronics  Mart  maintains  a  database  to  track  its  purchase.  The  database  includes  a  table  named
                 PURCHASE with the following attributes:                                                  [4]
                 P_ID: Shows the unique identifier for each purchase
                 BRAND: Indicates the brand name of the purchased item
                 ITEM: Specifies the name of the item purchased
                 DATE: Indicates the date when the purchase was made
                 AMOUNT: Lists the amount of the purchased product
                 QTY: Lists the quantity of the items purchased
                                                     Table: PURCHASE

                  P_ID            BRAND          ITEM           DATE           AMOUNT          QTY
                  P01             Dell           Laptop         2025-01-10     70000           5
                  P02             Samsung        Tablet         2025-02-15     35000           10
                  P03             Epson          Printer        2025-03-05     18000           3
                  P04             Sony           Monitor        2025-04-10     45000           7
                 (a)  Write an SQL query to display the total amount of the items purchased before 2025-04-01.
                 (b)  Write an SQL query to display the brands of Monitor and Printer.
                  (c)  Write an SQL query to display the names and brands of items with minimum amount.
                 (d)  Write an SQL query to display the Total_Amount of the items purchased (Total Amount = Amount*Qty)
                                                           Or
                 An organization maintains a database of employees. The database includes a table named STAFF with the
                 following attributes:
                 SID: Shows the unique identifier for each staff member.
                 NAME: Indicates name of the staff members.
                 DEPT: Specifies department of the staff members.
                 SALARY: Indicates monthly salary of the staff members.
                                                       Table: STAFF

                                  SID            NAME           DEPT           SALARY
                                  S01            Meher Sharma  HR              55000
                                  S02            Rohit Kapoor   IT             72000
                                  S03            Anita Verma    Finance        62000
                                  S04            Shreya Sharma  Sales          45000
                                  S05            Tvisha Mehta   HR             67000
                                  S06            Mohit Chawla   Finance        85000


              P.6        Informatics Practices with Python–XII
   28   29   30   31   32   33   34   35   36   37   38