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

CBSE Sample Papers For Class 12 Computer Science Set 6 With Solutions

Uploaded by

Amala Ashok
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views

CBSE Sample Papers For Class 12 Computer Science Set 6 With Solutions

Uploaded by

Amala Ashok
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CBSE Sample Papers for Class 12 Computer Science Set 6

Time: 3 hrs Max.


Marks: 70
Instructions
1. Please check this question paper contains 35 questions.
2. The paper is divided into 5 Sections A, B, C, D and E.
3. Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
4. Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
5. Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
6. Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
7. Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
8. All programming questions are to be answered using Python Language only.
Section – A
Question 1.
State True or False [1]
“The method that can be used to delete a range of values from a list is del”.
Question 2.
In which module, ceil() function resides? [1]
(a) pandas (b) pyplot (c) random (d) math
Question 3.
Given L=[2,3,4,5,6]. The output of print(L[-1:-5]) is [1]
(a) [6,5,4] (b) Error (c) [] (d) [6,5]
Question 4.
The ……. function returns True if all the characters in a string are digits. [1]
(a) isalnum() (b) isdigit() (c) isnumber() (d) isalpha()
Question 5.
Given a tuple t=(2,5,1,6,3). The statement t.sort() returns [1]
(a) (1,2,3,5,6) (b) (6,5,3,2,1) (c) Error (d) None of these
Question 6.
The seek(n) places the file pointer at position n with reference to [1]
(a) Beginning (b) End (c) Current position (d) Position 10
Question 7.
To see a list of all the databases in the system , the command may be used. [1]
(a) Show (b) Show databases (c) Display databases (d) View databases
Question 8.
It is a way to convey a Python object into a character stream. [1]
(a) Pickling (b) Unpickling (c) dump() method (d) load() method
Question 9.
in and not in are ……. Operators. [1]
(a) Arithmetic (b) Membership (c) Logical (d) Identity
Question 10.
Rows of a relation are called [1]
(a) relation (b) tuples (c) data structure (d) an entity
Question 11.
Fill in the blank: While opening a binary file the character has to be added to the mode of opening. [1]
(a) b (b) x (c) u (d) b
Question 12.
If a table cames 10 columns and 15 rows, what is its degree? [1]
(a) 10 (b) 150 (c) 15 (d) 25
Question 13.
State whether the following statement is True or False : Modulation and demodulation is performed by
modem. [1]
Question 14.
t1=(9, 6, 7, 6)
t2=(2, 8, 12, 20)
The output of the statement below is [11
print( min(t1) + max(t2))
(a) 26 (b) 25 (c) Error (d) None of these
Question 15.
Fill in the blank is a system of interlinked hypertext accessed via internet. [1]
Question 16.
The arrangement where all data pass through a central computer is known as
(a) ring topology (b) mesh topology (c) star topology (d) bus topology
Directions In the question numbers 17 and 18, a statement of Assertion (A) is followed by a statement of
(R). Choose the correct option.
Question 17.
Assertion (A)Pickling is a way to convey a Python object into character stream.
Reason (R) To perform pickling, the pickle module needs to be imported.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true but R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false but R is true.
Question 18.
Assertion (A) A recursive function does not require a loop. [1]
Reason (R) A recursive function calls itself again and again until a certain condition is true.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true but R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false but R is true.
Section – B
Question 19.
(a) Expand the following terms [1+1=2]
PPP, XML
(b) What is the mean by SMS?
Or
(a) Mr. Lai owns a factory which manufactures automobile spare parts. Suggest him the advantages of
having a web page for his factory.
(b) Name one commonly used open source Internet browser and one commonly used open source
operating system.
Question 20.
Observe the code given below and find the output [2]
s="oceanview"
count=0
for a in s:
if a in "stuv":
count+=1
print(count)
Question 21.
Given the following code [2]
d={ "Bed" :145000, "Almirah" :9000, "Chair" :1000}
for v in d.keys( ):
if d[v]>100000 :
d[v]-=10000
print(d)
What will be the output of the print statement?
Or
Find the output of following code
Name="PythoN3@1"
R = ""
for x in range(len(Name)):
if Name[x].isupper():
R=R+Name[x].lower( )
elif Name[x].islower( ):
R=R+Name[x].upper( )
elif Name[x].isdigit( ):
R=R+Name[x-1]
else:
R=R+"#"
print(R)
Question 22.
Explain database and DBMS in detail. [2]
Or
Differentiate between char(n) and varchar(n) data types with respect to databases.
Question 23.
(a) What is the minimum number of iterations that while( ) loop could make? [2]
(b) Write an appropriate loop for the condition a loop is to be repeated loo times.
Question 24.
What output will the following code produce? [2]
y=str( 123)
x="hello"*3
print(x,y)
x=”hello" + world”
y=len(x)
print(y,x)
Or
Write function names for the following with respect to strings.
(a) To make the first letter of a string in capital.
(b) To find the index of the 1st occurrence of a string in another.
Question 25.
Determine the hierarchy of operations and evaluate following expression.
A = 3*4//5+5/,7+8—2 +4/12
Section – C
Question 26.
With respect to the table PAYMENTS given below , write output of the following questions. [1 × 3 = 3]
TABLE : PAYMENTS

(i) To display the average of employees salary from PAYMENTS table.


(ii) To count the total number of employees from PAYMENTS table Department wise
(iii) To count distinct values of column Department from PAYMENTS table.
Question 27.
Write a code in Python to open a Binary file “College.dat” containing records of students as per following
structure. [3]
Roll Name SemPercentage
The code should display only records of students from the file where the percentage is greater than 30.
Or
Write a method countopen( ) to count and display the number of lines starting with the word
‘OPEN’(including lower cases and upper cases) present in a text file “start, txt”.
e.g. If the file “start.txt” contains the following lines:
Get the data value to be deleted;
Open the file for reading from it.
Read the complete file into a list
Delete the data from the list
Open the file
Open same file for writing into it
Write the modified list into file.
Close the file.
The method should display
Total lines started with word ‘OPEN’ is/are: [3]
Question 28.
Write SQL commands from (i) to (iii) on the basis of the table INTERIORS given below [1 × 3 = 3]
TABLE: INTERIORS

(i) To show all information about the Sofa from the INTERIORS table.
(ii) To list the ITEMNAME, which are priced at more than 10000 from the INTERIORS table.
(iii) To list ITEMNAME and TYPE of those items, in which DATEOFSTOCK is before 22/01/02 from the
INTERIORS table in descending order of ITEMNAME.
Question 29.
Write a user defined function to accept a string and check whether it is palindrome or not.
(A palindrome is a string that is same as its reverse) [3]
Question 30.
Explain the traversal operation in a stack. [3]
Write the algorithm for Traversal of a stack to display its contents.
You need not to write the actual code.
Section – D
Question 31.
Consider the following table [1 × 4 = 4]
TABLE:INTERIORS

Write statements to
(a) Write a command to display only the Column ITEMNAME , Net Amount(PRICE- DISCOUNT)
(b) Display only ITEMNAME and Discount column.
(c) Which clause is to be used to search non blank values in the table?
(d) Which command will be used to make the “No” column as the primary key?
Question 32.
A binary file “Telephone.dat” exists storing details of BSNL customers as per following structure. [4]
PhoneNo CustomerName ConnType
Write a program in Python for adding and displaying record count from the binary file using following
functions
NewCustomer() To add data of customers to the binary file “Telephone.dat”.
Note : The existing connection data should be preserved.
PrintConnections() To open the file “Telephone.dat” and display the connections and number of
connections.
Section – E
Question 33.
Tech Up Corporation (TUC) is a professional consultancy company. The company is planning to set up their
new offices in India with its hub at Hyderabad. As a network adviser, you have to understand their
requirement and suggest to them the best available solutions. Their queries are mentioned as (a) to (e)
below. [1 × 5 = 5]

(a) What will the most appropriate block, where TUC should plan to install their server?
(b) Draw a block to block cable layout to connect all the buildings in the most appropriate manner for
efficient communication.
(c) Write names of different types of Modems.
(d) Which of the following devices will be suggested by you to connect each computer in each of the
buildings?
(i) Gateway
(ii) Switch
(iii) Modem
(e) Company is planning to connect its Block in Hyderabad which is more than 20 km. Which type of
network will be formed?
Question 34.
(a) What is DDL? Explain with its commands. [1 + 4 = 5]
(b) Write a code in Python to update the class of a student to 12 whose roll number is 22. The table
structure is as follows :
RollNo Name Class Perc
Note:
Database :PythonDB
Table: Student
Host: localhost
UserId:root
Password: arihant
Or
(a) What is DML? Explain with its commands.
(b) Write a code in Python to delete the record of a student whose rollno is 33.
The table structure is as follows
RollNo Name Class Perc
Note :
Database :PythonDB
Table: Student
Host: localhost
UserId:root
Password: arihant
Question 35.
(a) What is the use of writerows() function for CSV files? [2 + 3=5]
(b) A binary file “Hotel.dat” exists storing details of hotel customers as per following structure:
RoomId CustomerName Days
Write a program in Python for adding and displaying records from the binary file using following functions
Reserve() To add data of customers to the binary file.
ShowReservations() To open the file “Hotel.dat” and display all the records.
Or
(a) What is csv. reader() function?
(b) Write a program in Python to modify records of a binary file “hotel.dat” using random access. The
program would accept the room id, search the record by random access and display. It will then accept the
new data and modify the file.
The file structure is
RoomId Customer Name Days

You might also like