Class 12 CS Practical QP 2023
Class 12 CS Practical QP 2023
Class 12 CS Practical QP 2023
SET A
PRACTICAL EXAMINATION 2022-2023
School Code :
School Name :
Class : XII
Subject Code : 083
Subject : COMPUTER SCIENCE(NEW)
Reg.No : ___________________________
Date & Day :
Max.Marks : 30
Time : 3:00 HRS
Q.No Description Marks
Q1. Write a Menu Driven Python program to find Factorial and Sum of List of [8]
numbers Using Function.
The code given below inserts the following record in the table "Students":
Rollno - integer, Name- string , Age –integer, Percentage - integer
Note the following to establish connectivity between Python and MYSQL:
➢ Username: root
➢ Password: root
➢ The table exists in a MYSQL data base named "School".
➢ The details (Roll no, Name, Age, Percentage) are to be accepted from
the user.
import ___________________ as sql # Statement 1
con1=sql.connect(host="localhost",user="root",password="root",
database="school")
mycursor=_______________ #Statement 2
print("Students with Percentage greater than 75 are : ")
_________________________ #Statement 3
data=__________________ #Statement 4
for i in data:
print(i)
print()
con1.close()
(a) Complete the Statement 1 by writing the name of library/Package
need to import for database.
(b) Complete the Statement 2 to form the cursor object.
(c) Complete the Statement 3 to by writing the execution query that
extracts records of those students whose Percentage is greater than
75.
(d) Complete the Statement 4 to read the complete result of the query
(records whose Percentage is greater than 75) into the object named
data, from the table student in the database.
Q3. Practical Record (Report File) [7]
Q4. Project file [8]
Q5. Viva Voce [3]
School Code :
School Name :
Class : XII
Subject Code : 083
Subject : COMPUTER SCIENCE (NEW)
Reg.No : ___________________________
Date & Day :
Max.Marks : 30
Time : 3:00 HRS
Q.No Description Marks
The code given below inserts the following record in the table "EMP":
EmpId - integer, Name- string , Salary –integer.
Note the following to establish connectivity between Python and MYSQL:
➢ Username: root
➢ Password: root
➢ The table exists in a MYSQL data base named "Employees".
➢ The details (EmpId, Name and Salary) are to be accepted from the
user.
import ___________________ as sql # Statement 1
con=sql.connect(host="localhost",user="root",password="root",
database="Employees")
eno=int(input("Enter Employee ID : "))
name=input("Enter name : ")
sal=int(input("Enter Salary : "))
cur=______________________ # Statement 2
Q=______________________ # Statement 3
cur.execute(Q)
con._______________ #Statement 4
print("Employee Details are stored Successfully")
con.close()
(a) Complete the Statement 1 by writing the name of library/Package
need to import for database.
(b) Complete the Statement 2 to form the cursor object.
(c) Complete the Statement 3 by writing the query that inserts the record
in the table EMP.
(d) Complete the Statement 4 to add the record permanently in the
database.
Q3. Practical Record (Report File) [7]
Q4. Project file [8]
Q5. Viva Voce [3]
School Code :
School Name :
Class : XII
Subject Code : 083
Subject : COMPUTER SCIENCE (NEW)
Reg.No : ___________________________
Date & Day :
Max.Marks : 30
Time : 3:00 HRS
Q.No Description Marks
The code given below inserts the following record in the table "Books".
BookId - integer, PName- string , Price –integer, Author - string
Note the following to establish connectivity between Python and MYSQL:
➢ Username: root
➢ Password: root
➢ The table exists in a MYSQL data base named "Bookshop".
➢ The details (Bookid, BName, Price, Author) are to be accepted from
the user.
School Code :
School Name :
Class : XII
Subject Code : 083
Subject : COMPUTER SCIENCE (NEW)
Reg.No : ___________________________
Date & Day :
Max.Marks : 30
Time : 3:00 HRS
Q.No Description Marks
The code given below inserts the following record in the table Trainer.
TId - integer, TName- string , City – String, DOJ - Date
Note the following to establish connectivity between Python and MYSQL:
➢ Username: root
➢ Password: root
➢ The table exists in a MYSQL data base named "Company".
➢ The details (Tid, TName, City, DOJ) are to be accepted from the
user.
School Code :
School Name :
Class : XII
Subject Code : 083
Subject : COMPUTER SCIENCE (NEW)
Reg.No : ___________________________
Date & Day :
Max.Marks : 30
Time : 3:00 HRS
Q.No Description Marks
The code given below inserts the following record in the table "Graduate":
SId - integer, SName- string , Stipend – integer, Dept- string
Note the following to establish connectivity between Python and MYSQL:
➢ Username: root
➢ Password: root
➢ The table exists in a MYSQL data base named "University".
➢ The details (Sid, SName, Stipend, and Dept) are to be accepted
from the user.
School Code :
School Name :
Class : XII
Subject Code : 083
Subject : COMPUTER SCIENCE (NEW)
Reg.No : ___________________________
Date & Day :
Max.Marks : 30
Time : 3:00 HRS
Q.No Description Marks
The code given below inserts the following record in the table "Library":
CDNO - integer, Name- string , Qty – integer, Price – integer.
Note the following to establish connectivity between Python and MYSQL:
➢ Username: root
➢ Password: root
➢ The table exists in a MYSQL data base named "School".
➢ The details (CDNO, Name, Qty, Price) are to be accepted from the
user.