0% found this document useful (0 votes)
34 views2 pages

Class 12 Practical

1) The document provides instructions for a computer science exam, including questions on Python programming, database connectivity, a report/practical file, and a project. 2) Question 1 offers multiple programming problems - counting file characteristics, implementing a stack with lists, working with binary and CSV student data files. 3) Question 2 involves connecting to a MySQL "medicine" database, running a query to retrieve drug records between $50-100, and retrieving the result set.

Uploaded by

allformyseva143
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Class 12 Practical

1) The document provides instructions for a computer science exam, including questions on Python programming, database connectivity, a report/practical file, and a project. 2) Question 1 offers multiple programming problems - counting file characteristics, implementing a stack with lists, working with binary and CSV student data files. 3) Question 2 involves connecting to a MySQL "medicine" database, running a query to retrieve drug records between $50-100, and retrieving the result set.

Uploaded by

allformyseva143
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

JAWAHAR NAVODAYA VIDYALAYA,VELERU,KRISHNA

All India Senior Secondary Certificate Examination


School Code: 59334
Time 3 Hours | Subject: Computer Science (083) | M.M. : 30
Q1. LAB TEST
[8+4=12]
A. 1) Write a Python Program read the file and to count total no.of
characters,vowels,consonants,digits,uppercase,lowercase and spaces and other
characters in the file named idday.txt?
OR
2) write a python program implementing stack operation using list in python
OR
3)A.write a program to get a student data(roll number,name and marks)and write into a binary file
B. write a program to open a binary file and display the students record in import pickle
OR
4)A. write a program to create a csv file to store student data(rollno,name,marks)
obtain data from user and write 5 records into the file
B. write a program to read and display the contents from a csv file(student.csv)

B. Complete the following database connectivity program by writing missing statements and
perform the given query.
(4)
import ______________________________ as sqltor #1
mycon = sqltor.________( host = “localhost”, user = “root”, passwd = “123”,
database = “medicine” ) #2
cursor = mycon.cursor( )
cursor.execute(______________________ ) #3
data = cursor._________________ #4
for rec in data:
print ( rec )
mycon.close( )
a. Complete the statement #1,by writing the name of library / package need to import for
database connectivity.
b. Complete the statement #2, write the name of method require to create connection
between python and mysql.
c. Complete the statement #3, write the query to display those drug records which price is
between the 50 to 100 from table DRUG.
d. Complete the statement #4, to retrieve all records from the result set.
Q.2 Report/Practical File
(7)
Q.3 Project
(8)
Q.4 Viva voce
(3)

External Examiner Internal Examiner

Name : _____________________ Name :


______________________
Sign : _____________________ Sign :
_____________________
Examiner No: _______________ Examiner No:
__________________

You might also like