0% found this document useful (0 votes)
18 views5 pages

Grade XII CS Board Practicals (SAMPLE) - 1

The document outlines the practical examination for Computer Science (083) for Grade 12 at The Camford International School for the academic year 2024-2025. It includes five sets of examination papers, each containing programming tasks in Python and SQL, practical file requirements, project file requirements, and viva voce components. Each set has specific questions focusing on problem-solving using Python functions and SQL queries with a total maximum score of 30 marks.

Uploaded by

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

Grade XII CS Board Practicals (SAMPLE) - 1

The document outlines the practical examination for Computer Science (083) for Grade 12 at The Camford International School for the academic year 2024-2025. It includes five sets of examination papers, each containing programming tasks in Python and SQL, practical file requirements, project file requirements, and viva voce components. Each set has specific questions focusing on problem-solving using Python functions and SQL queries with a total maximum score of 30 marks.

Uploaded by

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

THE CAMFORD INTERNATIONAL SCHOOL

Practical Examination (2024-2025)


COMPUTER SCIENCE-083
GRADE: 12ABC SET-I MAX MARKS: 30
DATE: 07.01.2025 DURATION: 3 HOURS
General Instructions:
1. All Questions are compulsory
2. All programming questions are to be answered using Python Language and MySQL only
Q.1 : Problem Solving using PYTHON [8+ 4 = 12 Marks ]

(A) Write a user defined function filter_str_with_a( ) that takes a list of strings as (4)
arguments and returns a new list containing only strings that contains the
letter "a".
(B) A binary file “employee.dat” has structure [Empid, EName, Designation ]. (4)
a) Write a user defined function Create() to input data for a record and add it
to employee.dat .
b) Write a user defined function Display() in Python to display those records
from “employee.dat” where Empid is more than 101.
Q.2 : SQL QUERIES: (4)
Consider the following tables and write SQL queries to:

TABLE: CUSTOMERS TABLE: PURCHASES


CNO CNAME CITIES SNO QTY PUR_DATE CNO
C1 SANYAM DELHI S1 15 2018-12-25 C2
C2 SHRUTI DELHI S2 10 2018-11-10 C1
C3 MEHER MUMBAI S3 12 2018-11-10 C4
C4 SAKSHI CHENNAI S4 7 2019-01-12 C7
C5 RITESH INDORE S5 11 2019-02-12 C2
C6 RAHUL DELHI S6 10 2018-10-12 C6
C7 AMEER CHENNAI S7 5 2019-05-09 C8
C8 MINAKSHI BANGALORE S8 20 2019-05-09 C3
C9 ANSHUL MUMBAI S9 8 2018-05-09 C9
S10 15 2018-11-12 C5
S11 6 2018-08-04 C7

(A) Create tables CUSTOMERS and PURCHASES and shown above and insert all records.
(B) Display the number of CUSTOMERS along with their respective CITIES in each of the CITIES.
(C) To display the CNAME and CITIES of all CUSTOMERS in ascending order of their QTY purchased.
(D) To display details of all CUSTOMERS whose CITIES are neither Delhi nor Mumbai.

Q.3 Practical file (7)


Q.4 Project file (8)
Q.5 Viva Voce (3)

TCIS/Grade-12 /CS / Practical Exam/2024-2025


THE CAMFORD INTERNATIONAL SCHOOL
Practical Examination (2024-2025)
COMPUTER SCIENCE-083
GRADE: 12ABC SET-II MAX MARKS: 30
DATE: 07.01.2025 DURATION: 3 HOURS
General Instructions:
1. All Questions are compulsory
2. All programming questions are to be answered using Python Language and MySQL only
Q.1 : Problem Solving using PYTHON [8+ 4 = 12 Marks ]

(A) A text file named AGENCIES.TXT contains some text. Write the definition for a function (4)
Showsites() in Python which displays all such words of the file which have more than 9
characters and start with "www.".
(B) A li st contai ns followin g record of a customer: [Cu stomer_name, (4)
Phone_nu mb er, City]
Wr it e t he fo llow ing user defined funct io ns t o per for m given operat io ns
o n t he st ack named ‘stat us’ :
i. Pu sh_element() – To Push an o bject co nt aining name and P ho ne
number o f cust o mer s who live in Goa t o the st ack
ii. Pop _element() – To Pop t he o bject s fro m t he st ack and disp la y
t hem. Also, d ispla y “St ack E mpt y” when t her e ar e no ele ment s in
t he st ack.
Q.2 : SQL Interface with Python : (4)

W ri t e a cod e i n Pyt h on t h at i n s e rt s re co rd i n t h e t ab le Pat i en t :


P _ id – int eg er
Na me – st r ing
D_ id – int eg er
C har g es – int eger
No t e t he fo llo w ing t o est abl is h co nnect i vit y bet wee n P yt ho n a nd MYS Q L:
( A ) User na me is r o o t
( B) P as swo r d is 12345
( C ) T he t a ble e x ist s in a MYS Q L dat a ba se na med HOS P I T AL.
( D ) T he d et a ils ( p_ id , Na me , D_ id a nd C har ges) ar e t o be ac cept ed fr o m
t he us er .

Q.3 Practical file (7)


Q.4 Project file (8)
Q.5 Viva Voce (3)

TCIS/Grade-12 /CS / Practical Exam/2024-2025


THE CAMFORD INTERNATIONAL SCHOOL
Practical Examination (2024-2025)
COMPUTER SCIENCE-083
GRADE: 12ABC SET-III MAX MARKS: 30
DATE: 07.01.2025 DURATION: 3 HOURS
General Instructions:
1. All Questions are compulsory
2. All programming questions are to be answered using Python Language and MySQL only
Q.1 : Problem Solving using PYTHON [8+ 4 = 12 Marks ]

(A) Write a function LShift(Arr,n) in Python, which accepts a list Arr of numbers and n is a numeric (4)
value by which all elements of the list are shifted to left.
Sample Input Data of the list Arr= [ 10,20,30,40,12,11], n=2
Output Arr = [30,40,12,11,10,20]
(B) Write a Program in Python that defines and calls the following user defined functions: (4)
(i) ADD() – To accept and add data of an employee to a CSV file ‘record.csv’. Each
record consists of a list with field elements as empid, name and mobile to store
employee id, employee name and employee salary respectively.
( ii) COUNTR() – To count the number of records present in the CSV file named
‘record.csv’. Also, d ispla y “St ack E mpt y” when t her e ar e no
ele ment s in t he st ack.
Q.2 : SQL Interface with Python : (4)

Consider the following table "Result"


ROLL_NO SNAME SEM1 SEM2 SEM3 DIVISION
101 KARAN 366 410 402 I
102 NAMAN 300 350 325 I
105 ARPIT 100 75 178 IV
106 SABINA 100 205 217 II
107 NEELAM 470 450 471 I
W ri t e a cod e i n Pyt h on t h at
i) Increase the SEM2 marks of the students by 3% whose name begins with ‘N’.
ii) Add a column REMARKS in the table with datatype as varchar with 50 characters
No t e t he fo llo w ing t o est abl is h co nnect i vit y bet wee n P yt ho n a nd
MYS Q L:
( A ) User na me is r o o t
( B) P as swo r d is 12345
( C ) T he t a ble e x ist s in a MYS Q L dat a ba se na med s c ho o l.

Q.3 Practical file (7)


Q.4 Project file (8)
Q.5 Viva Voce (3)

TCIS/Grade-12 /CS / Practical Exam/2024-2025


THE CAMFORD INTERNATIONAL SCHOOL
Practical Examination (2024-2025)
COMPUTER SCIENCE-083
GRADE: 12ABC SET-IV MAX MARKS: 30
DATE: 07.01.2025 DURATION: 3 HOURS
General Instructions:
1. All Questions are compulsory
2. All programming questions are to be answered using Python Language and MySQL only
Q.1 : Problem Solving using PYTHON [8+ 4 = 12 Marks ]
(A) Write a function INDEX_LIST(L), where L is the list of elements passed as argument to the (4)
function. The function returns another list named ‘indexList’ that stores the indices of all Non-
Zero Elements of L.
(B) Consider a file, SPORT.DAT, containing records of the following structure: (4)
[SportName, TeamName, No_Players] Write a function, copyData(), that reads contents
from the file SPORT.DAT and copies the records with Sport name as “Basket Ball” to
the file named BASKET.DAT. The function should return the total number of records
copied to the file BASKET.DAT.
Q.2 : SQL Queries : (4)
Consider the following table "Personal"
P_ID Name Desig Salary Allowance
P01 Rohit Manager 89000 4800
P02 Kashish Clerk NULL 1600
P03 Mahesh Superviser 48000 NULL
P04 Salil Clerk 31000 1900
P05 Ravina Superviser NULL 2100
W ri t e S Q L Q u e ri e s t o
( A ) Create the above table and insert values in it.
( B) Increase the salary by 5% of personals whose allowance is known.
( C ) Display Name and Total Salary (sum of Salary and Allowance) of all personals. The column
heading ‘Total Salary’ should also be displayed.
( D ) Delete the record of personals who have salary greater than 25000
(E)
Q.3 Practical file (7)
Q.4 Project file (8)
Q.5 Viva Voce (3)

TCIS/Grade-12 /CS / Practical Exam/2024-2025


THE CAMFORD INTERNATIONAL SCHOOL
Practical Examination (2024-2025)
COMPUTER SCIENCE-083
GRADE: 12ABC SET- V MAX MARKS: 30
DATE: 07.01.2025 DURATION: 3 HOURS
General Instructions:
1. All Questions are compulsory
2. All programming questions are to be answered using Python Language and MySQL only
Q.1 : Problem Solving using PYTHON [8+ 4 = 12 Marks ]

(A) Write a user defined function FilterWords() in python which read lines from a text file (4)
NewsLetter.TXT, and display those words, which are lesser than 4 characters and starts with a
vowel.
(B) A dictionary contains names and marks as key-value pairs of 5 students. Write a program, (4)
with separate user-defined functions to perform the following operations:
i. Push the keys (name of the student) of the dictionary into a stack, where the
corresponding value (marks) is greater than 70.
ii. Pop and display the content of the stack.

Q.2 : SQL Queries : (4)

Consider the following tables

TABLE: PRODUCT TABLE: BRAND


PCODE PNAME UPRICE RATING BID BID BNAME
P01 SHAMPOO 120 6 M03 M02 DANT KANTI
P02 TOOTHPASTE 54 8 M02 M03 MEDIMIX
P03 SOAP 25 7 M03 M04 PEPSODENT
P04 TOOTHPASTE 65 4 M04 M05 DOVE
P05 SOAP 38 5 M05
P06 SHAMPOO 245 6 M05

W ri t e S Q L Q u e ri e s t o
( A ) Create the above table and insert values in it.
(B) Display product name and brand name from the tables PRODUCT and BRAND.
(C) Display the average rating of Medimix and Dove brands
(D)Display the name, price, and rating of products in descending order of rating.
Q.3 Practical file (7)
Q.4 Project file (8)
Q.5 Viva Voce (3)

TCIS/Grade-12 /CS / Practical Exam/2024-2025

You might also like