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

Class 12 Computer Science Sample Paper Set 10

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

Class 12 Computer Science Sample Paper Set 10

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/ 15

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/10 Set ~ 10
Roll No. Q.P Code 15/10/10
Candidates must write the Q.P Code
on the title page of the answer-book.

 Please check that this question paper contains 11 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]
The value of the expressions 4/(3*(4-2)) and 4/3*(4-2) is the same.
2. Fill in the blank: [1]
________ clause is used with SELECT statement to display data in a sorted form with respect to a specified
column.

a) HAVING b) WHERE

c) ORDER BY d) DISTINCT
3. Which command is used to display the name of existing databases? [1]

a) show databases; b) display databases;

c) result databases; d) output databases;


4. Which of the following functions removes all leading and trailing spaces from a string? [1]

a) rstrip() b) lstrip()

c) strip() d) all of these


5. What will the following code produce? [1]
i. L= ['im', 'ur']
LI = range(len(L))
for i in LI :
L[i] = L[i] .upper()
print(L)
ii. T = ('im', 'ur')
T1 = range(len(T))
for i in T1 :
T[i] =T[i].upper( )
print (T)
6. Signals generated by an operating system to send it over phone line must be further converted into a/an [1]

a) analog signal b) microwave

c) AC signal d) digital signal


7. What is the difference between r+ and w+ modes? [1]

a) Depends on the operating system. b) In w+ mode, the pointer is initially placed at


the beginning of the file and for r+, the
pointer is placed at the end.

c) No difference. d) In r+ mode, the pointer is initially placed at


the beginning of the file and for w+, the
pointer is placed at the end.
8. Which of the following is correct to retrieve any character at index 'i' in string 's'? [1]

a) s.__getitem__(i) b) s.getitem(i-1)

c) s.__getitem__(i-1) d) s.getitem(i)
9. Which of the following is not a valid datatype in SQL? [1]

a) DECIMAL b) DATE

c) STRING d) CHAR
10. What will be the output of the following code? [1]
fn = file ("poem.txt","r")
size = len(fn.read())
print fn.read(5)
11. State true or false: [1]
A python function may return multiple values.
12. Which data structure is used for implementing recursion? [1]

a) List b) Queue

c) Array d) Stack
13. What is data inconsistency? [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 will be the output of the following code snippet? [1]
rec = {"Name" : "Python", "Age" : "20", "Addr" : "ND", "Country" : "USA"}
id1 = id(rec)
del rec
rec= {"Name" : "Python", "Age":"20", "Addr" : "N2", "Country" : "USA"}
id2 = id(rec)
print(id1 == id2)

a) False b) 1

c) True d) Exception
16. The operation whose result contains all pairs of tuples from the two relations, regardless of whether their [1]
attribute values match.

a) Intersection b) Set difference

c) Join d) Cartesian product


17. The virus that uses MS Office suite as its host to replicate is known as? [1]

a) Trojan b) Worm

c) Macro Virus d) Word Virus


18. Each computer connected to the Internet must [1]

a) have a web browser b) have a unique IP address

c) have a modem connection d) be a pentium machine


19. Assertion (A): If two variables are defined with the same name with the two different scopes, then the variable [1]
treated as local variable.
Reason (R): We can not access a local variable globally.

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): The tell() method is used to print the byte number at which the file pointer currently exists. [1]
Reason (R): The seek() method which enables us to modify the file pointer position externally.

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 float() function returns a floating-point number. [1]
Reason (R): It takes one argument.

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. How is Coaxial cable different from Optical Fibre? [2]
23. Write Python code to increase age of all employees by 1 year in the Employee table of database HTMdb with [2]
userid HRMan and password HRMANexe@pwd.
24. In the below given code fragments, indicate the data type of each bold part by choosing the correct type of data [2]
from the following type.
a. int
b. float
c. bool
d. str
e. function
f. list of int
g. list of str
i. L = inputline.split( )
while L != ( ) :
print(L)
L = L[1 :]
ii. L = ['Hiya', 'Zoya', 'Preet']
print(L[0] + L[1])
OR
Why is the line 4 of the following code giving error, while line 3 executes successfully? Can you change the code to
print the reversed string?

Lst1 = ['b', 'c', 'd']


Str1 = "bed"
print(Lst1.reverse())
print(Str1.reverse())

25. A resultset is extracted from the database using the cursor object (that has been already created) by giving the [2]
following statement.
Mydata = cursor.fetchone()
i. How many records will be returned by fetchone() method?
ii. What will be the datatype of Mydata object after the given command is executed?
26. Write a function in Python that displays the book names having 'Y' or 'y' in their name from a text file [2]
'Bookname.txt'.
Example:
If the file 'Bookname.txt' contains the names of following books:
One Hundred Years of Solitude
The Diary of a Young Girl
On the Road
After execution, the output will be:
One Hundred Years of Solitude
The Diary of a Young Girl
OR
Write a Python program to check whether entered string is palindrome or not.
27. What is the output produced by following code? [2]
obj = open("New.txt", "w")
obj.write("A poem by Paramhansa Yogananda")
obj.write("Better than Heaven or Arcadia")
obj.write("I love thee, O my India !")
obj.write("And thy love I shall give")
obj.write("To every brother nation that lives.")
obj.close()
obj1 = open("New.txt", "r")
s1 = obj1.read(48)
print(sl)
obj1.close()
OR
Write a program to search the name and address of person having age more than 30 in the data list of person.
28. Make Python program and ask a question to user. [2]
Hint: What is your lucky number and print that number?
Section C
29. Write the definition of a function Sum3(L) in Python, which accepts a list L of integers and displays the sum of [3]
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
OR
Find the errors in code given below:
i. def minus(total, decrement)
output = total - decrement
print(output)
return (output)
ii. define check()
N = input ('Enter N:')
i=3
answer = 1 + i * * 4/N
Return answer
iii. def alpha(n, string = 'xyz', k = 10) :
return beta(string)
return n
def beta (string)
return string == str(n)
print(alpha("Valentine's Day"):)
print(beta (string = 'true'))
print(alpha(n=5, "Good-bye") :)
30. Write the output (i-iii) for the following SQL commands. [3]
Table : FASHION

ID Product Price Qty

F01 Kajal 970 10

F02 Foundation 2100 15

F03 Night Cream 1700 20

F04 Day Cream 1400 10

F05 Shampoo 1200 25

F06 Lipstick 850 32

i. SELECT COUNT(Product) FROM FASHION;


ii. SELECT SUM(Price*Qty) FROM FASHION WHERE Product="Night Cream";
iii. SELECT LEFT (Product, 4) FROM FASHION WHERE Price>1500;
OR
What do you understand by Primary Key? Give a suitable example of Primary Key from a table containing some
meaningful data.
31. Answer the questions (i) to (iv) based on the following: [3]

class Book
{
char Bno[20];
protected:
float Price;
public:
void GetB();
void ShowB();
};
class Member
{
char Mno[20];
protected:
char Name[20];
public:
void GetM();
void ShowM();
};
class Library : public Member, private Book
{
char Lname[20];
public:
void GetL();
void ShowL();
};
void main()
{
Library L;
}

i. Which type of Inheritance out of the following is illustrated in the above example?
- Single Level Inheritance, Multilevel Inheritance, Multiple Inheritance
ii. Write the names of all the data members, which are directly accessible by the member function GetL() of
class Library.
iii. Write the names of all the member functions, which are directly accessible by the member function
ShowL() of class Library.
iv. Write the names of all the members, which are directly accessible by the object L of class Library declared
in the main() function.
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.
Section D
32. Write Push (contents) and Pop (contents) methods in Python to add numbers and remove numbers considering [4]
them to act as Push and Pop operations of stack.
OR
Write a program to print a string in reverse order.
33. A binary file "Book.dat" has structure [BookNo, Book_Name, Author, Price], [4]
i. Write a user defined function CreateFile() to input data for a record and add to Book.dat.
ii. Write a function CountRec(Author) in Python which accepts the Author name as parameter and count and
return number of books by the given Author are stored in the binary file "Book.dat"
34. Consider the following tables STUDENT and STREAM. Write SQL commands for the statements (i) to (v). [4]
TABLE: STUDENT

SCODE NAME AGE STRODE POINTS GRADE

101 Amit 16 1 6 NULL

102 Arjun 13 3 4 NULL

103 Zaheer 14 2 1 NULL

105 Gagan 15 5 2 NULL

108 Kumar 13 6 8 NULL

109 Rajesh 17 5 8 NULL

110 Naveen 13 3 9 NULL

113 Ajay 16 2 3 NULL

115 Kapil 14 3 2 NULL

120 Gurdeep 15 2 6 NULL


TABLE: STREAM

STRCDE STRNAME

1 SCIENCE+COMP

2 SCIENCE+BIO

3 SCIENCE+ECO

4 COMMERCE+MATHS

5 COMMERCE+SOCIO

6 ARTS+MATHS

7 ARTS+SOCIO

i. To display the name of streams in alphabetical order from table STREAM.


ii. To display the number of students whose POINTS are more than 5.
iii. To update GRADE to ‘A’ for all those students, who are getting more than 8 as POINTS.
iv. ARTS+MATHS stream is no more available. Make necessary change in table STREAM.
v. To display student’s name whose stream name is science and computer.
OR
Given the following tables for a database LIBRARY
TABLE: BOOKS

Book_Id Book_ Name Author_Name Publishers Price Type Qty

F0001 The Tears William Hopkins First Publ 750 Fiction 10

F0002 Thunder bolts Anna Roberts First Publ 700 Fiction 5

T0001 My First C++ Brain & Brooke EPB 250 Text 10

T0002 C++ Brainworks A.W.Rossaine TDH 325 Text 5

C0001 Fast Cook Lata Kapoor EPB 350 Cookery 8

TABLE: ISSUED

Book_Id Quantity_Issued

F0001 3

T0001 1

C0001 5

Write SQL queries for (i) to (v).


i. To show Book name, Author name and Price of books of EPB Publishers.
ii. To list the names from books of Fiction type.
iii. To display the names and price of the books in descending order of their price.
iv. To increase the price of all books of First Publ Publishers by 50.
v. To display the detail of book whose quantity less than 10.
35. Consider the table product and client with structures as follows: [4]

Product client
ProductName ClientName

Manufacturer City

Price P_ID

Write Python codes for the following:


i. To display the details of those clients whose city is Delhi.
ii. To display the details of products whose price is in range of 50 to 100 (Both values included)
iii. To display the Client Name, City from table Client.
iv. To display the price of all the items by the manufacturer ABC.
v. To display the product name and 4 items its price from the product table.
Section E
36. Knowledge Supplement Organisation has set up its new center at Mangalore for its office and web-based [5]
activities. It has 4 blocks of buildings as shown in the diagram below:

Center to center distances between various blocks

Block A to Block B 50 m

Block B to Block C 150 m

Block C to Block D 25 m

Number of Computers

Block A 25

Block B 50

Block C 125

Block D 10

i. What type of network will be formed if all blocks are connected?


ii. Suggest the most suitable place (i.e., block) to house the server of this organisation with a suitable reason.
iii. Suggest the placement of the following devices with justification
a. Repeater
b. Hub/Switch
iv. The organization is planning to link its front office situated in the city in a hilly region where cable
connection is not feasible, suggest an economic way to connect it with reasonably high speed.
37. Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables. [5]
TRAINER

TID TNAME CITY HIREDATE SALARY

101 SUNAINA MUMBAI 1998-10-15 90000

102 ANAMIKA DELHI 1994-12-24 80000

103 DEEPTI CHANDIGARH 2001-12-21 82000


104 MEENAKSHI DELHI 2002-12-25 78000

105 RICHA MUMBAI 1996-01-12 95000

106 MANIPRABHA CHENNAI 2001-12-12 69000

COURSE

CID CNAME FEES STARTDATE TID

C201 AGDCA 12000 2018-07-02 101

C202 ADCA 15000 2018-07-15 103

C203 DCA 10000 2018-10-01 102

C204 DDTP 9000 2018-09-15 104

C205 DHN 20000 2018-08-01 101

C206 0 LEVEL 18000 2018-07-25 105

i. Display the Trainer Name, City & Salary in descending order of their Hiredate.
ii. To display the TNAME and CITY of Trainer who joined the Institute in the month of December 2001.
iii. To displayTNAME, HIREDATE, CNAME, STARTDATE from tables TRAINER and COURSE of all those
courses whose FEES is less than or equal to 10000. (iv) To display number of Trainers from each Ans. city.
iv. SELECT TID. TNAME, FROM TRAINER WHERE CITY NOT IN ('DELHT', 'MUMBAI');
v. SELECT DISTINCT TID EROM COURSE;
vi. SELECT TID, COUNT(*), MIN (FEES) FROM COURSE. CROUP BY TID HAVING COUNT(*)>1;
vii. SELECT COUNTS), SUM(FEES) FROM COURSE WHERE STARTDATE< '2018-09- 15';
OR
Answer the questions (i) to (v) on the basis of the following tables SHOPPE and ACCESSORIES.
TABLE: SHOPPE

Id SName Area

S001 ABC Computeronics CP

S002 All Infotech Media GK II

S003 Tech Shoppe CP

S004 Geeks Tecno Soft Nehru Place

S005 Hitech Tech Store Nehru Place

TABLE: ACCESSORIES

No Name Price Id

A01 Mother Board 12000 S01

A02 Hard Disk 5000 S01

A03 Keyboard 500 S02

A04 Mouse 300 S01

A05 Mother Board 13000 S02


A06 Keyboard 400 S03

A07 LCD 6000 S04

T08 LCD 5500 S05

T09 Mouse 350 S05

T10 Hard Disk 4500 S03

i. To display Name and Price of all the Accessories in ascending order of their Price.
ii. To display Id and SName of all Shoppe located in Nehru Place.
iii. To display Minimum and Maximum Price of each Name of Accessories.
iv. To display Name, Price of all Accessories and their respective SName, where they are available.
v. To display name of accessories whose price is greater than 1000.

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