Class 12th IP Practical-1
PRACTICAL
Q1. a) Write the code to create the series ‘serObj’ and answer the questions that follow.
Jan 31
Feb 28
Mar 31
Apr 30
i) Write the command to add one row: ‘May’ – 31
ii) Write the command to update Feb to 29
iii) Write the command to change index to 1,2,3,4,5 in place of Jan, Feb, Mar, Apr and May.
iv) Write a command to print a month name having number of days less than 31.
v) Write the output:
(a) print(serObj < 30)
(b) print(serObj + 3)
b) Write a Python program to display a BAR CHART of the number of students in a school.
i) Use different colors for each bar.
ii) Title for x axis should be ‘Groups’ and title for y axis should be ‘Number of Students’
iii) Ensure the title of chart is “Group wise Students” and grid line must be shown.
Sample data: Group: I, II, III, IV and Strength: 38, 30, 45, 49

a) Create a table DRUGDB with the fields given in below table and assuming data type of your own.
b) Consider the table DRUGDB. Write the SQL commands for queries given below:
- To increase the price of ‘Paracetamol’ by 35.
- To display the drugid, Rxid and pharmacy name of all records in descending order of their price.
- Display all the details of the drugs where name starts with ‘C’ and has ‘sh’ somewhere in the name.
- Display the drug name in lower case along with price rounded off to nearest interger.
- Delete the field name loc from drugdb table.