0% found this document useful (0 votes)
77 views8 pages

Set 6

This document is a sample question paper for the CBSC Class XII Computer Science exam for the academic year 2024-25, consisting of 37 questions divided into five sections with varying marks. It includes multiple-choice questions, programming tasks, and theoretical questions covering topics such as Python programming, database management, and network connectivity. The paper emphasizes the use of Python for programming questions and includes internal choices for some questions.

Uploaded by

kshiny.shiny
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)
77 views8 pages

Set 6

This document is a sample question paper for the CBSC Class XII Computer Science exam for the academic year 2024-25, consisting of 37 questions divided into five sections with varying marks. It includes multiple-choice questions, programming tasks, and theoretical questions covering topics such as Python programming, database management, and network connectivity. The paper emphasizes the use of Python for programming questions and includes internal choices for some questions.

Uploaded by

kshiny.shiny
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/ 8

CBSC 12th Computer Science Sample Paper 06 Page 1

Sample Paper 06
Computer Science (083)
CLASS XII 2024-25
Time: 3 Hours Max. Marks: 70
General Instructions:
1. This question paper contains 37 questions.
2. All questions are compulsory. However, internal choices have been provided in some questions. Attempt
only one of the choices in such questions
3. The paper is divided into 5 Sections- A, B, C, D and E.
4. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
7. Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
8. Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
9. All programming questions are to be answered using Python Language only.
10. In case of MCQ, text of the correct answer should also be written.

SECTION A

1. State True or False


“The pop() method removes and displays the last element of a list.”

2. What will be the output of the following code?


L = [6, 7, 8, 9, 10]
print(L[2:20])
(a) [8, 9, 10] (b) [ ]
(c) Error (d) [6,7,8,9,10]

3. The random function returns a random value between


(a) 1 and 10 (b) 0 and 10
(c) 0 and 1 (d) 1 and 100

4. To read three characters from a file object f, we use..........


(a) f.read(3) (b) f.read()
(c) f.readline() (d) f.readlines()

5. What will be the output of the following code snippet?


string = “Information”
print(string[-1:-10:-3])
Page 2 Sample Paper 06 NODIA APP

6. ............are drawn using certain special purpose symbols.


(a) Algorithm (b) Pseudocode
(c) Flowchart (d) Decision table

7. To arrange a table in descending order of field Salary the clause to be used is


(a) Order by Salary (b) Order by Salary Desc
(c) Arrange by SalaryDesc (d) Arrange by Salary

8. The BETWEEN clause can not be used for


(a) Integer Fields (b) Varchar Fields
(c) Date Fields (d) None of these

9. The constraint that ensures that the field does not get any NULL values is
(a) NULL (b) PRIMARY KEY
(c) CHECK (d) NOT NULL

10. Write the missing line to complete the code snippet below:
file = open(“data.txt”, “r+”)
file.write(“Python Programming”)
content = file.read()
file.close()

11. State whether the following statement is True or False:


Multiple `except` blocks can be used with a single `try` block in Python to handle different types of
exceptions.

12. is and is not are_____Operators.


(a) Membership (b) Identity
(c) Logical (d) Comparison

13. What will the following code display?


name = “Neha”
type (name)
(a) Invalid function <type> (b) <class ‘str’>
(c) <class ‘int’> (d) <class ‘float’>

14. Which of the following is not required while specifying the connection string in database connection?
(a) Host (b) Table name
(c) Username (d) Password

Continue on next page.....


CBSC 12th Computer Science Sample Paper 06 Page 3

15. The ALTER TABLE command belongs to.............category


(a) DML (b) TCL
(c) DDL (d) DCL

16. Which of the following are possible relational operations?


(a) Join (b) Selection
(c) Cartesian product (d) All of these

17. Given a tuple tup = (20,50,10,60,30). The statement append(90) returns


(a) (20,50,10,60,30,90) (b) (90)
(c) Error (d) (30,90)

18. To open a text file for adding records keeping the existing records the mode should be
(a) ab (b) xb
(c) rb (d) w+

19. A device that connects two dissimilar networks is


(a) Modem (b) Repeater
(c) Bridge (d) Gateway

Directions : (Q.Nos. 20-21) are Assertion and Reason based questions.

20. Assertion (A) : Binary files are processed faster than text files.
Reasoning (R) : They are written in Binary format and are more close to the computer.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true and R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false but R is true.

21. Assertion (A) : A function that is neither built in nor modular must be defined.
Reason (R) : The code of built in and modular functions are available for the Python compiler , but if the
function is not defined anywhere the compiler cannot get the code.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true and R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false but R is true.

Continue on next page.....


Page 4 Sample Paper 06 NODIA APP

SECTION B
22. Observe the code given below and find the output.
s=“OceanView”
print(s[8] +s[2:] +str(len(s)))

23. What are some commonly used DBMS software packages?

24. What is the purpose of switch in a network?


 o
Write names of few network devices.

25. (a) What is the output of below questions?


l1 = [23, 45, 19, 77, 10, 22]
(i) l1.sort()
(ii) max(l1)
(b) Find error in defination of the function given.
def finderrors(x=20,y)
print(x+y*2)

26. (a) Write the full forms of


(i) HTML
(ii) HTTPs
(b) Write any two advantages of tree topology.

27. What will be the output of the following code?


empdict={‘Eno’:[1,2,3,4], ‘Ename’ : [‘Raj’, ‘Seema’, ‘John’, ‘Smith’],
‘Sal’:[10000, 20000, 30000, 40000]}
print(empdict[‘Ename’][0], empdict[‘Sal’][0])
 o
Write any two differences between Dictionary and Tuple.

28. Mention atleast three limitations of DBMS.


 o
What are primary and alternate keys in a database? Provide suitable examples to explain each.

Continue on next page.....


CBSC 12th Computer Science Sample Paper 06 Page 5

SECTION C
29. The binary file “data.dat” contains student records with the following structure:

Ano Sname Marks


1 Raj 850
h
h
Write a Python program to search for a student by their number (ID) entered by the user. If the student is
not found, display an appropriate message.
 o
Write a program with method countand ( ) to count the word ‘and’ or And’ as an independent word in a
text file “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

30. Write the Push operation of stack containing person names. Notice that the name should only accept
characters, spaces and period(.) except digits. Assume that Pname is a class instance attribute.
 o
Find the final contents of a stack that encounters the following tokens.
Assume that an operand is pushed to stack and a binary operator pops two operands from stack and pushes
the result to the stack.
45, 30, + , 50, 80, +, +

31. Write user defined functions factors(num) and factorial(num) to find the factors and factorial of a number
accepted from the user and passed to the functions from main function.
 o
Riya wrote a program to search any string in text file “school”. Help her to execute the program successfully.
def check () :
datafile = open (.....)
found = input (“Enter any string to
be searched : ”)
f = False
for line in ....... :
if found in line :
f = .......
break
return f
f = check ()
if (f = =.......) :
print (“True”)
else :
print (......)
(i) Riya should open which file to search any string?
(ii) Which value will assign to f in Line 7?
(iii) Fill the blank in Line 5.
Page 6 Sample Paper 06 NODIA APP

SECTION E
32. (a) Underline the errors in the following code and write the correct code :
while s>0
if a%2=0
print(a%2)
elseif a%3=0 then
print(a%3)
(b) What is database connectivity? How to create a connection object?
 o
(a) Differentiate between identifier and keyword.
(b) What conditions or terms are included by BD-API?

33. Consider the tables Hotel and Room given below :

Table : Hotel
T Id C Name Room ld Dtof Arrival Charges
T1 Ritesh R1 2016-09-09 1800
T2 Sumana R2 2020-08-01 2000
T3 Abhi R3 1995-04-05 3000
T4 Ram R1 1994-02-02 2500
T5 Nitin R2 NULL 7000

Table : Room
RoomlD RoomType FLoor
R1 AC First
R2 Deluxe Second
R3 General Second
With respect to the tables given above, write SQL commands for the following.
(i) Create the table hotel and insert the 1st record
(ii) Display the details of customers who have arrived after 01-05-2005
(iii) Display names and room types of customers whose charges are between 2000 and 3000.
(iv) Display Names of customers who are staying in “AC” rooms”

34. Write the SQL commands for (i) to (iv) on the basis of the table HOSPITAL

TABLE: HOSPITAL
No Name Age Department Date-ofadm Cha-rges Sex
1 Sandeep 65 Surgery 23/02/98 300 M
2 Ravine 24 Orthopaedic 20/01/98 200 F
3 Karan 45 Orthopaedic 19/02/98 200 M
4 Tarun 12 Surgery 01/01/98 300 M
CBSC 12th Computer Science Sample Paper 06 Page 7

5 Zubin 36 ENT 12/01/98 250 M


6 Ketaki 16 ENT 24/02/98 300 F
7 Ankita 29 Cardiology 20/02/98 800 F
8 Zareen 45 Gynaecology 22/02/98 300 F
9 Kush 19 Cardiology 13/01/98 800 M
10 Shailya 31 Nuclear Medicine 19/02/98 400 M
(i) To show all information about the patients of Cardiology Department.
(ii) To list the name of female patients, who are in Orthopaedic Department.
(iii) To list names of all patients with their date of admission in ascending order.
(iv) To display Patient’s Name, Charges, Age for male patients only.
 o
Write the command to view all the tables in database.

35. What does csv writer() function do?


Write a python program for operating on a csv file “people.csv” using following functions :
(a) addPeople() :To input details of people and add them to a csv file “people.csv” without removing the
previous records. The record structure is as follows :
AdhrNo Name City Age
The file should store only those people whose age is greater than and equal to 18.
(b) getPeople() : To open the file “people.csv” and display records whose name starts with “P”

SECTION E
36. Consider the following table Cab :

Table : Cab
Cab lD Cab Type Nop Rate
Cb1 Sedan 4 40
Cb2 Yellow Taxi 5 25
Cb3 Mini 3 30
Cb4 Micro 2 20
(i) Which column can serve as the primary key?
(ii) Write a command to display the fields of the table along with their types and sizes.
(iii) Write statements to :
(a) Add a new column Driver varchar(30)
(b) Change data type of Rate column to float(6,1).
 (Option for part (iii) only)
o
(a) To display the cab type whose rate is more than 25.
(b) To display cab id and Number of passengers for cab sedan.
Page 8 Sample Paper 06 NODIA APP

37. Quick Learn University is establishing its academic blocks in Prayag Nagar and planning to set up a
network. The university includes three academic blocks and a human resources center, as illustrated in the
diagram below.

Centre to Centre distance between various blocks/Centre is as follows:

Law Block to Business Block 40 m


Law Block to Technology Block 80 m
Law Block to HR Centre 105 m
Business Block to Technology Block 30 m
Business Block to HR Centre 35 m
Technology Block to HR Centre 15 m
Number of computers in each of the blocks/centre are as follows:

Law Block 15
Technology Block 40
HR Centre 115
Business Block 25
(i) Suggest the most suitable place (i.e. block/Centre) to install the server of this university with a suitable
reason.
(ii) Suggest an ideal layout for connecting these block/Centre for a wired connectivity.
(iii) Which device you will suggest to be placed/installed in each of these blocks/Centre to efficiently
connect all the computers with in these blocks/Centre ?
(iv) The university is planning to connect its admission office in the closest big city, which is more than 250
km from university, which type of network out of LAN, MAN or WAN will be formed? Justify your
answer.
(v) Expand the following
LAN
WAN

 EN

You might also like