0% found this document useful (0 votes)
65 views

Class 12 Computer Science Sample Paper Set 14

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)
65 views

Class 12 Computer Science Sample Paper Set 14

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
You are on page 1/ 13

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/14 Set ~ 14
Roll No. Q.P Code 15/14/14
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]
Mathematical operations can be performed on a string.
2. What is the full form of DDL? [1]

a) Data Definition Language b) Dynamic Data Language

c) Detailed Data Language d) Data Derivation Language


3. The SQL statements to access and manipulate data in existing table is/are: [1]

a) System Control Statements b) Session Control Statements

c) DDL d) DML
4. What is the default return value for a function that does not return any value explicitly? [1]

a) double b) None

c) null d) int
5. What is the output of the following? [1]
i=9
while True:
if (i + 1)%4 == 0:
break
print(i, end = ' ')
i += 1
6. In computer, process of superimposing a low frequency signal over a high frequency signal is called [1]

a) frequency modulation b) amplitude modulation

c) modulation d) demodulation
7. Which of the following option is the correct Python statement to read and display the first 10 characters of a text [1]
file "Notes.txt"?

a) F = open('Notes.txt'); b) F = open('Notes.txt');
print(F.read(10)) print(F.write (10))

c) F = open ('Notes.txt'); d) F = open('Notes.txt');


print (F.dump(10)) print(F.load(10))
8. The set of records retrieved after executing an SQL query over an established database connection is called [1]
________.

a) table b) resultset

c) sqlresult d) result
9. Which of the following commands in SQL is used to add a new record into a table? [1]

a) ADD b) NEW

c) UPDATE d) INSERT
10. How is method write() different from writelines() in python? [1]
11. State true or false: [1]
You can combine a numeric value and a string by using the + symbol.
12. ________ form of access is used to add/remove nodes from a stack. [1]

a) Both of LIFO and FIFO b) FIFO

c) LIFO d) Weighted
13. What is relation? Define the relational data model. [1]
14. A ________ is a network point that acts as an entrance to another network. [1]

a) Hub b) Repeater

c) Gateway d) Bridge
15. What is the output of following code? [1]
bool('False')
bool()

a) False b) True
True True

c) True d) Runtime Error


False
16. Fill in the blank. [1]
________ is a number of tuples in a relation.
a) Domain b) Cardinality

c) Attribute d) Degree
17. The checksum of 1111 and 1111 is ________. [1]

a) 0000 b) 1111

c) 1110 d) 0111
18. Which command is used for finding the IP address and default gateway of your network? [1]

a) netstat b) ping

c) ipconfig d) ifconfig
19. Assertion (A): The tuple items cannot be deleted by using the del keyword. [1]
Reason (R): To delete an entire tuple, we can use the del keyword with the tuple 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.


20. Assertion (A): flush() function flushes the write buffer of the file stream. [1]
Reason (R): The isatty() method, returns True if the file stream is distinct.

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 return statement is used at the end of the function and returns the result of the function. [1]
Reason (R): Return statement terminates the function execution and transfers the result where the function is
called.

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. Give the full form for the following: [2]
i. FM
ii. AM
iii. NFS
iv. FTP
23. Write Python code to create a table faculty with the following fields. [2]
Id, LastName, FirstName, Locationid, phone, rank, startdate
Rank should be one of the following
ASSO, FULL, ASST, INST
24. What is logical error? [2]
OR
Determine the hierarchy of operations and evaluate the following expresssion.

a = 2*3 // 4 + 4 // 4 + 8 - 2 + 5 // 8
25. Given below is a table Item in database Inventory. [2]

ItemID ItemName Quantity UnitPrice

101 ABC 5 120

102 XYZ 7 70

103 PQR 8 65

104 XYZ 12 55

Riya created this table but forget to add column ManufacturingDate. Can she add this column after creation of
table? If yes, write the code where user’s name and password are system and test respectively.
26. Which of the following are invalid names and why? [2]
i. PaidInterest
ii. S-num
iii. Percent
iv. 123
v. abc km
vi. elif
OR
Write the definition of a function AddPrev(A, N) in Python, which should add every previous value of list A to the
next value and assign the sum at the index of the next value. The list A contains N number of integers. The function
should finally display the entire content of the changed list.
Example: If the list A contains the following 10 elements (i.e. for N=10).

Then the function should display the output as follows:


9 # 14 # 29 # 39 # 64 # 76 # 81 # 90 # 95 # 107 #
27. Write a program to count the number of uppercase letters in a text file "Article.txt". [2]
OR
What are two types of text files?
28. Write the definition of a function ChangeEvenOdd(Num, N) in Python, which should add 1 to every even [2]
number and subtract 1 from every odd number. The function should finally display the changed content of the
list Num.
Example: If the list Num contains the following 10 elements (i.e. for N=10)

Then the function should display the output as follows:

24 13 4 11 8 4 14 8 4 13

Section C
29. Write a function that takes a number n and then returns a randomly generated number having exactly n digits [3]
(not starting with zero) e.g., if n is 2 then the function can randomly return a number 10-99 but 07, 02, etc., are
not valid two-digit numbers.
OR
Write the definition of a function Sum3(L) in Python, which accepts a list L of integers and displays the sum of all
such integers from the list L which end with the digit 3.
For example, if the list L is passed
[123, 10, 13, 15, 23]
then the function should display the sum of 123, 13, 23, i.e. 159 as follows:
Sum of integers ending with digit 3 = 159
30. Consider the following tables STORE and SUPPLIERS and answer the following parts of this question : [3]
Table: STORE

Item No. Item Scode Qty Rate Last Buy

2005 Sharpener Classic i 23 60 8 31-Jun-09

2003 Ball Pen 0.25 22 50 25 01-Feb-10

2002 Gel Pen Premium 21 150 12 24-Feb-10

2006 Gel Pen Classic 21 250 20 11-Mar-09

2001 Eraser Small 22 220 6 19-Jan-09

2004 Eraser Big 22 110 8 02-Dec-09

2009 Ball Pen 0.5 21 180 18 03-Nov-09

Table : SUPPLIERS

Scode Sname

21 Premium Stationers

23 Soft Plastics

22 Tetra Supply

Give the output of the following SQL queries :


i. SELECT COUNT (DISTINCT Scode) FROM Store;
ii. SELECT Rate * Qty FROM Store WHERE ItemNo = 2004;
iii. SELECT Item, Sname FROM Store S, Suppliers P
WHERE S.Scode = P.Scode AND ItemNo = 2006;
iv. SELECT MAX (LastBuy) FROM Store;
OR
Explain the use of ORDER BY clause.
31. From the program code given below, identify the parts mentioned below : [3]
1. def processNumber(x):
2. x = 72
3. return x + 3
4.
5. y = 54
6. res = processNumber(y)
Identify these parts: function header, function call, arguments, parameters, function body, main program.
OR
What is the difference between a local variable and a global variable? Also, give a suitable Python code to illustrate
both.
Section D
32. Write a program to implement a stack for these book details (bookno, bookname). That is, now each item node [4]
of the stack contains two types of information -a bookno and its name. Just implement push and display
operations.
OR
Write a Python program to check if a string is a palindrome or not using stack.
33. Write a program with method countand() to count the word 'and' or 'And as an independent word in a text file [4]
"status.txt". e.g. if the content of the file "status, txt" is as follows:
Welcome to your one-step solutions for all your study, practice and assessment needs for various competitive &
recruitment examinations and school segment. We have been working tirelessly for over a decade to make sure
that you have best in class study resources because you deserve SUCCESS AND NOTHING LESS...
Then the output of the program should be:
Count of _and_ in file is/are: 3
34. Consider the following tables CARDEN and CUSTOMER and answer the following parts of this question : [4]
Table: CARDEN

Ccode CarName Make Color Capacity Charges

501 A-Star Suzuki RED 3 14

503 Indigo Tata SILVER 3 12

502 Innova Toyota WHITE 7 15

509 SX4 Suzuki SILVER 4 14

510 C Class Mercedes RED 4 35

Table: CUSTOMER

CCode Cname Ccode

1001 Hemant Sahu 501

1002 Raj Lai 509

1003 Feroza Shah 503

1004 Ketan Dhal 502

Give the output of the following SQL queries :


i. SELECT COUNT (DISTINCT Make) FROM CARDEN;
ii. SELECT MAX(Charges), MIN(Charges) FROM CARDEN;
iii. SELECT COUNT(*), Make FROM CARDEN;
iv. SELECT CarName FROM CARDEN WHERE Capadty = 4;
OR
Give output for following SQL queries as per given table(s) :
Table: Teacher

No. Name Department Dateofjoining Salary Sex


1. Raja Computer 21/5/98 8000 M

2. Sangita History 21/5/97 9000 F

3. Ritu Sociology 29/8/98 8000 F

4. Kumar Linguistis 13/6/96 10000 M

5. Venkatraman History 31/10/99 8000 M

6. Sidhu Computer 21/5/86 14000 M

7. Aishwarya Sociology 11/1/1988 12000 F

i. SELECT MIN(DISTINCT Salary) FROM Teacher;


ii. SELECT MIN(Salary) FROM Teacher WHERE Sex = "M";
iii. SELECT SUM(Salary) FROM Teacher WHERE Department = "History";
iv. SELECT AVG(Salary) FROM Teacher WHERE Dateofjoining < {1/1/98};
35. Consider the table product with the following structure. [4]
P_ID, ProductName, Manufacturer, Price.
Write Python code to increase the price of all products by 50.
Section E
36. Bias Methodologies is planning to expand their network in India, starting with three cities in India to build [5]
infrastructure for research and development of their chemical products. The company has planned to set up their
main office in Pondicherry at three different locations and have named their offices as Back Office, Research
Lab and Development Unit. The company has one more research office namely Corporate Unit in Mumbai. A
rough layout of the same is as follows:

Approximate distance between these offices are as follows

From To Distance

Research Lab Back Office 110 m

Research Lab Development Unit 16 km

Research Lab Corporate Unit 1800 km

Back Office Development Unit 13 km

In continuation of the above, the company experts have planned to install the following number of
computers in each of their offices

Research Lab 158

Back Office 79

Development Unit 90
Corporate Unit 51

i. Suggest the type of network required (out of LAN, MAN, WAN) for connecting each of the following office
units.
Research Lab and Back Office
Research Lab and Development Unit.
ii. Which one of the following device, will you suggest for connecting all the computers with in each of their
office units?
Switch/Hub
Modem
Telephone.
iii. Which of the following communication medium, will you suggest to be procured by the company for
connecting their local office units in Pondicherry for very effective (high speed) communication?
Telephone cable
Optical fibre
Ethernet cable.
iv. Suggest a cable/wiring layout for connecting the company’s local office units located in Pondicherry. Also,
suggest an effective method/technology for connecting the company's office unit located in Mumbai.
v. Which building is suitable to install the server with suitable reason?
37. Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables: [5]
TABLE: BOOK

Code BNAME TYPE

F101 The Priest Fiction

L102 German easy Literature

C101 Tarzan in the lost world Comic

F102 Untold story Fiction

C102 War heroes Comic

TABLE: MEMBER

MNO MNAME CODE ISSUEDATE

M101 RAGHAV SINHA LI 02 2016-10-13

M103 S ARTHAKJ OHN FI 02 2017-02-23

M102 ANISHA KHAN C101 2016-06-12

i. To display all details from table MEMBER in descending order of ISSUEDATE.


ii. To display the BNO and BNAME of all Fiction Type books from the table Book.
iii. To display the TYPE and number of books in each TYPE from the table BOOK.
iv. To display all MNAME and ISSUEDATE of those members from table MEMBER who have books issued
(i.e., ISSUEDATE) in the year 2017.
v. SELECT MAX (ISSUEDATE) FROM MEMBER
vi. SELECT DISTINCT TYPE FROM BOOK
vii. SELECT A.CODE, BNAME, MNO. MNAME FROM BOOK A. MEMBER B WHERE A.CODE=
B.CODE
viii. SELECT BNAME FROM BOOK WHERE TYPE NOT IN ("FICTION", "COMIC")
OR
Consider the following table WORKER. Write SQL commands for the following statements.
Table: WORKER

ECODE NAME DESIG PLEVEL DOJ DOB

11 Radhe Shyam Supervisor P001 13-Sep-2004 23-Aug-1981

12 Chander Nath Operator P003 22-Feb-2010 12-Jul-1987

13 Fizza Operator P003 14-Jun-2009 14-Oct-1983

15 Ameen Ahmed Mechanic P002 21-Aug-2006 13-Mar-1984

18 Sanya Clerk P002 19-Dec-2005 09-Jun-1983

i. To display the details of all WORKERS in descending order of DOB.


ii. To display NAME and DESIG of those WORKERS, whose PLEVEL is either P001 or P002.
iii. To display the content of all the WORKERS table, whose DOB is in between '19-JAN-1984' and ‘18-JAN-1987’.
iv. To add a new row with the following :
19, 'Daya Kishore', 'Operator', 'P003', '19-Jun-2008', '11-Jul-1984'

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy