0% found this document useful (0 votes)
449 views13 pages

Exam Prep: CBSE & Entrance Tips

The Class 12 Computer Science Sample Paper is a meticulously crafted resource aimed at helping students prepare for their board examinations. It includes a diverse set of questions, such as programming problems, theoretical concepts, and case studies, aligned with the latest CBSE syllabus and exam pattern. Covering essential topics like Python programming, data structures, database management, and computer networks, this sample paper enhances both conceptual understanding and practical skills.

Uploaded by

Artham Resources
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)
449 views13 pages

Exam Prep: CBSE & Entrance Tips

The Class 12 Computer Science Sample Paper is a meticulously crafted resource aimed at helping students prepare for their board examinations. It includes a diverse set of questions, such as programming problems, theoretical concepts, and case studies, aligned with the latest CBSE syllabus and exam pattern. Covering essential topics like Python programming, data structures, database management, and computer networks, this sample paper enhances both conceptual understanding and practical skills.

Uploaded by

Artham Resources
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
  • Introduction and Overview: Provides an introduction to the document's purpose and includes a welcome note for educators and students.
  • General Instructions: Details the essential instructions for taking the examination, including question paper format and time allowance.
  • Sample Paper Questions: Presents a set of sample questions for the Class 12 Computer Science subject, formatted according to the examination guidelines.
  • Programming Problems: Contains programming-based problems and exercises requiring Python solutions and coding.
  • SQL Queries: Includes a series of SQL queries to be completed using information from provided data tables.
  • Closing and Additional Information: The back cover of the document, devoid of content.

Dear Teachers and Students,

Join School of Educators' exclusive WhatsApp, Telegram, and Signal groups for FREE access
to a vast range of educational resources designed to help you achieve 100/100 in exams!
Separate groups for teachers and students are available, packed with valuable content to
boost your performance.

Additionally, benefit from expert tips, practical advice, and study hacks designed to enhance
performance in both CBSE exams and competitive entrance tests.

Don’t miss out—join today and take the first step toward academic excellence!

Join the Teachers and Students


Group by Clicking the Link Below
Series ARSP/12 Set ~ 12
Roll No. Q.P Code 15/12/12
Candidates must write the Q.P Code
on the title page of the answer-book.

 Please check that this question paper contains 09 printed pages.


 Q.P. Code given on the right hand side of the question paper should be written
on the title page of the answer-book by the candidate.
 Please check that this question paper contains 37 questions.
 Please write down the serial number of the question in the answer-book
before attempting it.
 15 Minute times has been allotted to read this question paper. The question
paper will be distributed at 10:15 a.m. From 10.15 a.m to 10.30 a.m, the students
will read the question paper only and will not write any answer on the answer –
book during this period.

COMPUTER SCIENCE

Time allowed: 3 hours Maximum Marks: 70


General Instructions:

​This question paper contains 37 questions.

All questions are compulsory. However, internal choices have been provided in some questions. Attempt only one
of the choices in such questions.

The paper is divided into 5 Sections- A, B, C, D and E.

Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.

Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.

Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.

Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.

Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.

All programming questions are to be answered using Python Language only.

In case of MCQ, text of the correct answer should also be written.

Section A
1. State true or false: [1]
Do both the following represent the same list.
['a', 'b', 'c']
['c', 'a', 'b']
2. Which of the following attributes cannot be considered as a choice for the primary key? [1]

a) Id b) Street

c) Dept_id d) License number


3. Which of the following data models is an extension of relational data model? [1]

a) structured data model b) Semi structured data model

c) Object - oriented data model d) Object - relational data model


4. Fill in the blank: [1]
________ is not a valid built-in function for list manipulations.

a) extend() b) append()

c) length() d) count()
5. Write the output of the Python code given below: [1]
a=15
def update(x):
global a
a+=2
if x%2==0:
a*=x
else:
a//=x
a=a+5
print(a,end="$")
update(5)
print(a)

6. What is such a communication system called wherein data cannot be sent in both directions simultaneously? [1]

a) Full duplex b) Asynchronous

c) Synchronous d) Half duplex


7. In which file, no delimiters are used for line and no translations occur? [1]

a) Text file b) Binary file

c) csv file d) .mkv file


8. Which of the following method is used to create a connection between the MySQL database and Python? [1]

a) cont() b) con()

c) connector() d) connect()
9. In SQL, which command is used to SELECT only one copy of each set of duplicable rows? [1]

a) SELECT DIFFERENT b) All of these

c) SELECT UNIQUE d) SELECT DISTINCT


10. What is the use of the dump method? [1]
11. State true or false: [1]
State True or False.
Comments are not executed by interpreter.
12. Act of adding values into a stack is called [1]

a) Polling b) Pulling

c) Pushing d) Popping
13. Write a query on the customer table that will find the highest rating in each city. Put the output in this form: For [1]
the city (city), the highest rating is: (rating).
14. A repeater takes a weak and corrupted signal and ________ it. [1]

a) Reroutes b) Resembles

c) Regenerates d) Amplifies
15. Which code segment will output the number 20 to the console window? [1]
a) myValue01 = 10 b) myValue01 = "10"
myValue02 = 10 myValue02 = "10"
print(myValue01 + myValue02) myValue01 = myValue01 + myValue02
print(myValue02)

c) myValue01 = 10 d) myValue01 = "10"


myValue02 = 10 myValue02 = "10"
myValue01 = myValue01 + myValue02 print(myValue01 + myValue02)
print(myValue01)
16. Consider following SQL statement. What type of statement is this? [1]
CREATE TABLE employee (name VARCHAR, id INTEGER)

a) Integrity constraint b) DML

c) DDL d) DCL
17. Find ODD parity bit for 11100011 [1]

a) 1 b) 2

c) 3 d) 0
18. ________ is a networking device that forwards data packets between computer networks. [1]

a) Switch b) Hub

c) Router d) Repeater
19. Assertion (A): The code of the other programming language can't use in the Python source code. [1]
Reason (R): In Python, we don't need to specify the data-type of the variable.

a) Both A and R are true and R is the correct b) Both A and R are true but R is not the
explanation of A. correct explanation of A.

c) A is true but R is false. d) A is false but R is true.


20. Assertion (A): In the case of read mode if the file is doesn't exist then it gives an error. [1]
Reason (R): In the case of write mode if the file doesn't exist then it creates a new file automatically with the
same name.

a) Both A and R are true and R is the correct b) Both A and R are true but R is not the
explanation of A. correct explanation of A.

c) A is true but R is false. d) A is false but R is true.


21. Assertion (A): The python bin() function is used to return the binary representation of a specified integer. [1]
Reason (R): The results always start with the prefix 0b.

a) Both A and R are true and R is the correct b) Both A and R are true but R is not the
explanation of A. correct explanation of A.

c) A is true but R is false. d) A is false but R is true.


Section B
22. Explain the two types of duplex communication. [2]
23. Write Python code to insert following records into the order-details table. [2]
Database → sales
User id → Admin
Password → salar345
table name → order-details

ORDNUMB PARTNUMB NUMBORD QUOTPRIC

12489 AX12 11 14.95

12495 BT04 1 402.99

12491 BZ66 1 311.95

12498 CX11 2 57.95

24. What are tokens in Python? How many types of tokens are allowed in Python? Exemplify your answer. [2]
OR
Write a program to multiply all the items in a dictionary.
dic = { 'A' : 50, 'B' : 30, 'C' : 20, 'D' : 53}
25. Write a Python database connectivity script that deletes records from category table of database items that have [2]
name = 'Stockable'
26. Find the errors in following code and write the correct code. [2]
Def s(x):
a = ‘k'
print(a * x)
print(a * str(x))
for in [1, 2', 10 :
s(n)
i. Underline the corrections
ii. Write the reason!error next to it in comment form.
OR
Is the loop in the code below infinite? How do you know (for sure) before you run it?
m=3
n=5
while n < 10:
m = n -1
n = 2 * n-m
print(n, m)
27. What is the use of flush() function? [2]
OR
Explain seek() method.
28. In the following code, which variables are in the same scope? [2]
def func1( ):
a=1
b=2
def func2( ):
c=3
d=4
e=5
Section C
29. Write a function that takes a list that is sorted in ascending order and a number as argument. The function should [3]
do the following:
i. Insert the number passed as argument in a sorted list.
ii. Delete the number from the list.
OR
Write a function that receives an octal number and prints the equivalent number in other number bases i.e., in
decimal, binary, and hexadecimal equivalents.
30. Create a table named Programmers with the following structure: [3]

P_Name VARCHAR(20)

DOJ Date

SAL NUMBER

i. Display the name of the programmer, which has the highest salary.
ii. Update the salary of all programmer by 2000, whose name start with letter R.
OR
What is the purpose of using MySQL?
31. What is the utility of: [3]
i. default arguments
ii. keyword arguments
OR
Write definition of a method OddSum(NUMBERS) to add those values in the list of NUMBERS, which are not even.
Section D
32. Write a program to print a string in reverse order. [4]
OR
Write a program that depends upon the user's choice, either pushes or pops an element in a stack.
33. Write a function countHisHer() in Python, which reads the contents of a text file diary.txt and count the words [4]
His and Her (not case sensitive).
e.g. If the file contains
Pinaky has gone to his friend’s house.
His friend’s nam e is Ravya. Her house is 12 km from Pinaky’s house.
The function should display the output as:
Count for His: 2
Count for Her: 1
34. Give output for following SQL queries as per given table(s): [4]
Table: GRADUATE

S.NO. NAME STIPEND SUBJECT AVERAGE DIV

1. KARAN 400 PHYSICS 68 1

2. DIVAKAR 450 COMPUTER SC 68 1


3. DIVYA 300 CHEMISTRY 62 2

4. ARUN 350 PHYSICS 63 1

5. SABINA 500 MATHEMATICS 70 1

6. JOHN 400 CHEMISTRY 55 2

7. ROBERT 250 PHYSICS 64 1

8. RUBINA 450 MATHEMATICS 68 1

9. VIKAS 500 COMPUTER SC 62 1

10. MOHAN 300 MATHEMATICS 57 2

i. SELECT MIN (AVERAGE) FROM GRADUATE


WHERE SUBJECT = "PHYSICS";
ii. SELECT SUM(STIPEND) FROM GRADUATE WHERE DIV = 2;
iii. SELECT AVG(STIPEND) FROM GRADUATE WHERE AVERAGE >= 65;
iv. SELECT COUNT (distinct SUBJECT) FROM GRADUATE;
OR
Consider the following tables EMPLOYEE and SALGRADE and answer the following parts of this question :
Table : EMPLOYEE

ECODE NAME DESIG SGRADE DOJ DOB

101 Abdul Ahmad EXECUTIVE S03 23-Mar-2003 13-Jan-1980

102 Ravi Chander HEAD-IT S02 12-Feb-2010 22-Jul-1987

103 John Ken RECEPTIONIST S03 24-Jun-2009 24-Feb-1983

105 Nazar Ameen GM S02 11-Aug-2006 03-Mar-1984

108 Priyam Sen CEO SOI 29-Dec-2004 19-Jan-1982

Table : SALGRADE

SGRADE SALARY HRA

S0I 56000 18000

S02 32000 12000

S03 24000 8000

Give the output of the following SQL queries :


i. SELECT COUNT (SGRADE), SGRADE FROM EMPLOYEE GROUP BY SGRADE;
ii. SELECT MIN(DOB), MAX(DOJ) FROM EMPLOYEE;
iii. SELECT NAME, SALARY FROM EMPLOYEE E, SALGRADE S
WHERE E.SGRADE = S.SGRADE AND E.ECODE < 103 ;
iv. SELECT SGRADE, SALARY + HRA FROM SALGRADE WHERE SGRADE = 'S02';
35. Consider the tables FACULTY and COURSES with structure as follows. [4]
Write Python codes for the following.
i. To display details of these faculties whose salary is greater than 12000
ii. To display the details of courses whose fees is in the range of 15000 to 50,000 (both values included)
iii. To increase the fees of course "System Design" by 500
iv. To display the count of unique F_ID from courses table.
Section E
36. Gargi Education Service Ltd. is an educational organisation. It is planning to set up its India campus at Nepal [5]
with its head office at Mumbai. The Nepal campus has 4 main buildings-ADMIN, ENGINEERING, BUSINEES
and MEDIA. You as a network expert have to suggest the best network related solutions for their problems
raised in (i) to (v), keeping in mind the distance between the buildings and other given parameters.

Shortest distance between various buildings

ADMIN To ENGINEERING 50 m

ADMIN To BUSINESS 80 m

ADMIN To MEDIA 45 m

ENGINEERING To BUSINESS 60 m

ENGINEERING To MEDIA 50 m

BUSINESS To MEDIA 45 m

Mumbai Head Office To Nepal Campus 2175 m

Number of computers installed at various buildings are as follows

ADMIN 110

ENGINEERING 75

BUSINESS 40

MEDIA 10

Mumbai Head Office 20

i. Suggest the most appropriate location of the server inside the Nepal Campus (out of 4 buildings), to get the
best connectivity for maximum number of computers. Justify your answer.
ii. Suggest and draw the cable layout to efficiently connect various buildings within the Nepal Campus for
connecting the computers.
iii. Which hardware device will you suggest to be procured by the company to be installed to protect and control
the Internet uses within the campus.
iv. Which of the following will you suggest to establish the online face-to-face communication between the
people in the ADMIN office of Nepal Campus and Mumbai Head Office?
a. Cable TV
b. E-mail
c. Video Conferencing
d. Text Chat
v. Expand the following
MAN
PAN
37. Write queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables [5]
Table: VEHICLE

VCODE VEHICLETYPE PERKM

V01 VOLVO BUS 150

V02 AC DELUXE BUS 125

V03 ORDINARY BUS 80

V05 SUV 30

V04 CAR 18

Table: TRAVEL

CNO CNAME TRAVELDATE KM VCODE NOP

101 K. Niwal 2015-12-13 200 V01 32

103 Fredrick Sym 2016-03-21 120 V03 45

105 Hitesh Jain 2016-04-23 450 V02 42

102 Ravi Anish 2016-01-13 80 V02 40

107 John Malina 2015-02-10 65 V04 2

104 Sahanubhuti 2016-01-28 90 V05 4

106 Ramesh Jaya 2016-04-06 100 V01 25

Note:
• PERKM is Freight Charges per kilometre.
• Km is kilometres Travelled
• NOP is number of passengers travelled in vehicle.
i. To display CNO, CNAME, TRAVELDATE from the table TRAVEL in descending order of CNO
ii. To display the CNAME of all customers from the table TRAVEL who are travelling by vehicle with code
V01 or V02
iii. To display the CNO and CNAME of those customers from the table TRAVEL who travelled between 2015-
12- 31 and 2015-05-01
iv. To display all the details from table TRAVEL for the customers, who have travel distance more than 120 KM
in ascending order of NOP
v. SELECT COUNT (*), VCODE FROM TRAVEL GROUP BY VCODE HAVING COUNT (*) > 1
vi. SELECT DISTINCT VCODE FROM TRAVEL
vii. SELECT A.VCODE, CNAME, VEHICLETYPE FROM TRAVEL A, VEHICLE B WHERE A. VCODE =
B. VCODE and KM < 90
viii. SELECT CNAME, KM*PERKM FROM TRAVEL A, VEHICLE B WHERE A.VCODE = B.VCODE AND
A. VCODE 'V05'
OR
Write SQL commands for (i) to (v) on the basis of table COLLEGE
TABLE: COLLEGE

No Name Age Department Date of Join Basic Sex

1 Shalaz 45 Biology 13/02/88 10500 M

2 Sameera 54 Biology 10/01/90 9500 F

3 Yagyen 43 Physics 27/02/98 8500 M

4 Pratyush 34 Chemistry 11/01/93 7500 M

5 Aren 51 Mathematics 22/01/91 8500 M

6 Reeta 27 Chemistry 14/02/94 9000 F

7 Urvashi 29 Biology 10/02/93 8500 F

8 Teena 35 Mathematics 02/02/89 10500 F

9 Viren 49 Mathematics 03/01/88 9000 M

10 Prakash 22 Physics 17/02/92 8000 M

i. Write a query to change the Basic salary to 10500 of all those teachers from COLLEGE, who joined the
COLLEGE after 01/02/89 and are above the age of 50.
ii. Write a query to display Name, Age and Basic of all those from COLLEGE, who belong to Physics and
Chemistry department only.
iii. Which command will be used to delete a row from table COLLEGE, in which NAME is VIREN?
iv. Insert the following data in the given table COLLEGE
11, ‘Saurav’, 50, ‘Chemistry’, ‘18/05/93’, 12000, ‘M’
v. Identify the attribute best suitable to be declared as a primary key.

You might also like