PB 12 CS
PB 12 CS
(or)
34 b. Explain the scope of variables in Python with an example.
35 a. Explain the different ways to insert elements into a list in Python
(or)
35 b. Explain the characteristics of RDBMS
36 a. Write a Python script to create a table called ITEM with the following specification
Add one record to the table
Name of the database: ABC
Name of the table: ITEM
Column name and specification
Icode Integer and act as primary key
Item Name Character with length 25
Rate Integer
Record to be added 1008, Monitor, 15000
(or)
36 b. Explain the various buttons in Matplotlib Window
37 a. Explain the different types of functions in Python with example.
(or)
37 b. Identify the output of the following program after correcting the errors, if any, found in the
program.
class s:
sum=0
def __init__(self, __n):
self.n=__n
print("Object ", self.n)
def display(self, __value1, value2):
self.__value1=__value1
sum=__value1+value2
print('Result', sum)
v1=int(input('Enter value 1'))
v2=int(input('Enter value 2'))
ob1=s(1)
ob1.display(v1,v2)
ob2=s(12)
ob2.display('v1','v2')
38 a. Write in brief about SQLite and the steps used to use it.
(or)
38 b. Consider the following table structure
SUPPLIER
Suppno Name City Icode SuppQty
S001 Prasad Delhi 1008 100
S002 Anu Bangalore 1010 200
S003 Shahid Bangalore 1008 175
S004 Akila Hyderabad 1005 195
S005 Girish Hyderabad 1003 25
S006 Shylaja Chennai 1008 180
S007 Lavanya Mumbai 1005 325
Write SQL queries to do the following
i. Create Supplier table with Suppno as the primary key
ii. List the names of suppliers in Alphabetical order
iii. List the suppliers who do not reside in Chennai
iv. Identify the total quantity Supplied
v. Count the city wise list of suppliers