XII CS Practical

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Subject Code : 083 Time : 3 Hr

Subject : Computer Science Set: A


Max .Marks: 30

PRACTICAL EXAMINATION

1) Write a function Display() to implement the Python MySQL connectivity to display the
student details. The function should retrieve the students details from the table
STUDENT(Regno, Name , Stream, Avg) stored in MYSQL (4)

2) Create a text file POEM.txt in notepad which contains following content. (4)
The land is in a constant state of birth, Giving life
to all who live on Earth.
Our carelessness and fears Have taken a toll over the years.
Her land is parched and scorched As man
continues to light the torch.
We continue a want of speed and ease,
Write a menu driven program with following function definitions
a) CountVowel() - Read above file and display the count of vowels
3) Given the table Employee and Salgrade ,Write SQL commands for a) to d) (4)

a. To display details of all employee in alphabetical order of their names.


b. To display NAME, DESIG, SGRADE of those employee who joined in the
year 2009.
c. To display S G R A D E a n d number of employees working in each
GRADE from table EMPLOYEE
d. To display NAME, DESIG, SALARY, HRA from
tables EMPLOYEE and SALGRADE where SALARY
is less than 50000
4) Viva
5) Journal
6) Project
Subject Code : 083 Time : 2 Hr
Subject : Computer Science Set: B
Max .Marks: 30

PRACTICAL EXAMINATION
1) Write a function Display_Stream () to implement the Python MySQL connectivity to display
the students in the Science Stream . The function should retrieve the students details
from the table STUDENT(Regno, Name , Stream, Avg) stored in MYSQL (4)
2) Create a binary file Club.dat which contains the following information. Mno,
Mname, Type (S/L)Write a menu driven program with the following function definitions
(4)

 ADD()—to add the Member details


 DISPLAY()-- Displaying the L Members.
3) Given the table Item and Vendor ,Write SQL commands for a) to d) (4)

a) To display ICode, IName of all the vendors, who manufacture “Mobile Phones”.
b) To display IName, ICode, VName and price of all the products whose price
>=23000
c) To display Vname and IName manufactured by vendor whose code is “P04”.
d) Display VCode and Average Price of each Vendor

4) Viva
5) Journal
6) Project
Subject Code : 083 Time : 2 Hr
Subject : Computer Science Set: C
Max .Marks: 30
PRACTICAL EXAMINATION
1) Write a function Display_Avg() to implement the Python MySQL connectivity to display the
students whose avg>75 . The function should retrieve the students details from the
table STUDENT(Regno, Name , Stream, Avg) stored in MYSQL (4)

2) Create a CSV file Book.csv which contains the following information. BNO,
BNAME, PRICE. (4)
Write a menu driven program with the following function definitions

 ADD()—to store book details into the CSV file Book.csv


 SEARCH()—to Search and display the books whose PRICE is between 100 and 200
3) In a Bank’s database, there are two tables ‘Customer’ and ‘Transaction’ as shown below.
Customer

Acc_No Cust_Name Cust_City Cust_Phone Open_Bal


2101001 Sunita Ambala 9710557614 10000
2201002 Sandhya Patna 8223545233 15000
2301003 Vivek New Delhi 9972136576 13000
2401004 Meena New Delhi 9321305453 10000
Transaction

Trans_Id Acc_No Transaction_Type Amount


Tr001 2301003 Credit 15000
Tr002 2201002 Credit 20000
Tr003 2101001 Debit 3500
Tr004 2301003 Credit 26000
Tr005 2301003 Credit 24000
Consider these tables while attempting the questions given below:
a) Write a query to display customer’s name who has withdrawn the money
b) Write a query to display customer’s name, phone number, City, whose transaction type is
Credit.
c) Write a query to display the details of customers whose name ends with ‘a’.
d) Write a query to display account number and total amount of credit transaction done
based on account number.
4) Viva
5) Journal
6) Project
Subject Code : 083 Time : 2 Hr
Subject : Computer Science Set: D
Max .Marks: 30

PRACTICAL EXAMINATION
1) Write a function Display_Stream () to implement the Python MySQL connectivity to display
the students in the Commerce Stream . The function should retrieve the students details
from the table STUDENT(Regno, Name , Stream, Avg) stored in MYSQL (4)

2) Create a text file POEM.txt in notepad which contains following content. (4)

The land is in a constant state of birth,


Giving life to all who live on Earth.
Our carelessness and fears Have
taken a toll over the years.
Her land is parched and scorched As
man continues to light the torch.
We continue a want of speed and ease
Write a function CountLines() - Read above file and display the count of lines starting with ‘T’
or ‘t’.
3) Consider the following tables PARTICIPANT and ACTIVITY and answer the questions that
follow:

a) To display Activity Code along with number of participants participating in each


activity (Activity Code wise) from the table Participant
b) To display Names of Participants, Activity Code, Activity Name in alphabetic
ascending order of names of participants
c) To display Names of Participants along with Activity Codes and Activity Names for
only those participants who are taking part in Activities that have ‘bag’ in their
Activity Names and Points of activity are above 250.
d) To display House and no:of Participants in each house

4) Viva
5) Journal
6) Project
Subject Code : 083 Time : 2 Hr
Subject : Computer Science Set: E
Max .Marks: 30

PRACTICAL EXAMINATION

1) Write a function Display() to implement the Python MySQL connectivity to display the
student details. The function should retrieve the students details from the table
STUDENT(Regno, Name , Stream, Avg) stored in MYSQL (4)
2)Write a menu driven python program to implement stack to store the student details
(Regno, sname, avgmark). (4)
Write separate user defined to do the following
 push() insert student details
 pop() delete student
3) Given the table Employee and Salgrade ,Write SQL commands for a) to d) (4)

e. To display details of all employee in alphabetical order of their names.


f. To display NAME, DESIG, SGRADE of those employee who joined in the
year 2009.
g. To display S G R A D E a n d number of employees working in each
GRADE from table EMPLOYEE
h. To display NAME, DESIG, SALARY, HRA from
tables EMPLOYEE and SALGRADE where SALARY
is less than 50000
4) Viva
5) Journal
6) Project

You might also like