0% found this document useful (0 votes)
33 views7 pages

Qwertyui

Wef

Uploaded by

kmud81.raj
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)
33 views7 pages

Qwertyui

Wef

Uploaded by

kmud81.raj
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/ 7

COMPUTER SCIENCE (THEORY)

dEI;wVj foKku ¼lS}kfUrd½


Sample paper
2024-25
CLASS – 12
Time: 3 Hours Max. Marks: 70
Directions :-
funsZ'k %&
i) There are in all 26 questions in this question paper. All questions are compulsory.
bl iz'u i= esa dqy 26 iz'u gSaA lHkh iz'u vfuok;Z gSaA
ii) Marks allotted to questions are mentioned against them.
iz'uksa ds fy, vkoafVr vadks dk mYys[k muds lkeus fd;k x;k gSA
iii) Read each question carefully and answer to the point.
izR;sd iz'u dks /;ku ls i<+sa vkSj leqfpr mRrj nhft,A
iv) Question No.1 is multiple choice question. Four options are given in answer of each
part of this question. Write correct option in your answer book. Question No. 2 to 7
are definite answer type questions.
iz'u 1 cgqfodYih; iz'u gSA bl iz'u ds izR;sd [k.M ds mRrj esa pkj fodYi fn;s
x;s gSaA lgh fodYi viuh mRrj iqfLrdk eas fyf[k,A iz'u la[;k 2 ls 7 rd fuf'pr
mRrjh; iz'u gSaA
v) Each part of Question No. 1 carries one mark.Question No.2 to 7 are of one mark
each. Question No. 8 to 14 are of two marks each. Quention No.15 to 20 are of
three marks each. Question No. 21 to 26 are of four marks each.
izR;sd la[;k 1 dk izR;sd [k.M ,d vad dk gSA iz'u la[;k 2 ls 7 rd ,d vad ds
iz'u gSaA iz'u la[;k 8 ls 14 rd nks vad ds iz'u gSaA iz'u la[;k 15 ls 20 rd rhu
vad ds iz'u gSaA iz'u la[;k 21 ls 26 rd pkj vad ds iz'u gSaA
vi) There is no overall choice in this question paper, however, an internal choice has
been provided in few questions. Attempt only one of the given choice in such
questions.
bl iz'u i= esa lexz ij dksbZ fodYi ugha gS rFkkfi dfri; iz'uksa esa vkarfjd fodYi
iznku fd;k x;k gSA ,sls iz'uksa esa dsoy ,d fodYi dk gh mRrj nhft,A

Section- (A) Multiple Choice Question

Q 1) Choose correct option:


lgh fodYi dk p;u dhft,

1
i) Which one of the following is the default extension of a python file? 1
fuEufyf[kr esa ls dkSu lk ik;Fku Qkby dk fMQkWYV ,DlVsa'ku gS ?
a) .exe b) .p++ c) .py d) .p

ii) What is the mean of L in LEGB Rule for scope resolution ? 1


scope resolution ds fy, LEGB fu;e esa L dk D;k vFkZ gS ?
a) Local b) Last c) Least d) Library

iii) In which file, no delimiters are use for line and no translations occur ? 1
fdl Qkby esa ykbu ds fy, dks lhekadu dk mi;ksx ugha fd;k tkrk gS vkSj dksbZ
vuqoknu ugha gksrk gSS ?
a) Text file b) Binary file c) CSV file d) none of these

iv) Which of the following is not a correct Python statement to open a text file “Notes.
Txt” to write content into it? 1
fuEufyf[kr esa ls dkSu lk ikB~; Qkby [kksyus ds fy, ,d lgh ik;Fku dFku ugha gS
a) F=open(‘Notes.txt’,’w’)
b) F=open(‘Notes.txt’,’a’)
c) F=open(‘Notes.txt’,’A’)
c) F=open(‘Notes.txt’,’w+’)

v) A device that forward data packet from one network to another network in called ?
1
,d midj.k tks MsVk iSdsV dks ,d usVodZ ls nwljs usVodZ ij vxzsf"kr djrk gS] mls
D;k dgk tkrk gS?
a) Bridge b) Router c) Hub d) Gateway

vi) An attribute in a relation is a foreign key if it is the ------ key in any other relation? 1
,d relation esa ,d attribute ,d foreign key gksrh gS ;fn ;g fdlh vU; relation esa
-------- key gS?
a) Candidate b) Primary c) Super d) Alternate

vii) A set of possible data values is called? 1


laaHkkfor MsVkekuksa ds ,d lsV dks D;k dgk tkrk gS?
a) Attribute b) Degree c) Tuple d) Domain

viii) Consider the following SQL statement. What type of statement is this? 1
fuEu SQL dFku ij fopkj djsaA ;g fdl izdkj dk dFku gS?
CREATE TABLE employee (name VARCHAR, id INTEGER)
a) DML b) DDL c) DCL d) integrity constraint

Section-(B) Definite Answer Type Question


Q 2) To handle possible exceptions we use a ---------------block. 1
2
Possible exceptions dks handle djus ds fy, ge ,d ---------------- Cykd dk mi;ksx
djrs gSa
Q 3) Read the code shown below and pick out the keys? 1
uhps fn[kk, x;s dksM dks i<+sa vkSj keys dks pqus
D={‘one’:1,’Two’:2,’three’:3}

Q 4) In python which rule is used to decide the order in which the name spaces are to
be searched for scope resolution? 1
python esa fdl fu;e dk mi;ksx ml dze dks r; djus ds fy, fd;k tkrk gS]
ftlesa name spaces dks LdksifjtkWY;w'ku ds fy, searched fd;k tkrk gS ?

Q 5) The data types whose values cannot be changed in place are called ------- type. 1
MsVk izdkj ftuds values ugha cnyk tk ldrk gS --------- izdkj dgk tkrk gS?
Q 6) Which data type stores year, month and day values? 1
dkSu lk data type o"kZ] eghus vkSj fnu dh values dks store djrk gS

Q 7) which command is used for removing a table and all its data from the database? 1
MsVkcsl ls rkfydk vkSj mlds lHkh MsVk dks gVkus ds fy, fdl dekaM dk mi;ksx
fd;k tkrk gS

Section-(C)Very Short Answer Type Question


Q 8) What will be output of following code? 2
fuEufyf[kr dksM dk vkmViqV D;k gksxk
A=45
def func1():
global a
print(“value of a is” ,a)
a=5
print (“changed global a to” ,a)
fun1()
print (“value of a is ” ,a)

Q 9) What is the difference between a text file and binary file? 2


VsDlV Qkby vkSj ckbujh Qkby esa D;k varj gS
Q 10) What do you understand by local and global scope of variables? How can access a
global variable inside the function, if function has a variable with same name 2
Pkjksa ds local ,oa global scope ls vki D;k le>rs gSa vki QaD'ku ds vanj
,dglobal variable rd dSls igqWp ldrs gSa] ;fn QaD'ku esa ,d gh uke ds variable
gSa।
3
Q 11) Identify the error in the following code? 2
fuEu dksM esa =qfV dh igpku djsa
import pickle
data=[‘one’ , 2, [3,4,5] ]
with open (‘data2.dat’, ‘rb’) as f:
pickle. dump (data, f)

Q 12) Expand the following terms : 2


fuEufyf[kr dk iwjk uke fyf[k, ?
a) HTML b) TCP/ IP

Q 13) With reference to database define following : 2


MsVkcsl ds lanHkZ esa fuEufy[kr dks ifjHkkf"kr dhft,
a) Database b) Degree

Q 14) Differentiate between primary key and foreign key ? 2


primary key vkSj foreign key ds chp varj crkb,

Section-(D) Short Type Question


Q 15) What is scope ? What is the scope resolving rule of Python ? 3
Ldksi D;k gS ? ik;Fku esa scope resolving rule D;k gS ?
Q 16) Write a Python program to print the Fibonacci series ? 3
Fibonacci series dks fizaUV djus ds fy, ,d ik;Fku izksxzke fy[ksa ?

Q 17) Write a program to read following details of sports performance (sports,


competitions, prize-won) of your school and store into a CSV file delimited with tab
character ? 3
vius Ldwy ds sports performance (sports, competitions, prize-won)ds fuEufyf[kr
fooj.kksa dks i<+us ds fy, ,d izksxzke fy[ksa vkSj VSc o.kZ ds lkFk lhekafdr CSV
Qkby esa LVksj djsa ?
OR/vFkok
Write a program to generate prime number upto N. where N is a user input more
than 3 ?

Q 18) Convert the following infix expression to its equivalent postfix expression showing
stack contents for the conversion? 3
fuEufyf[kr infix expression dks blds led{k postfix expression esa duoVZ djsa?
(A+B* (C-D)/ E)
OR/ vFkok

4
Evaluate the following postfix expression using stack and show the contents of stack
after execution of each expression.
stack dk mi;ksx djds fuEufyf[kr postfix expression dk ewY;kadu djsa vkSj izR;sd
expression ds execution ds ckn stack dh contents fn[kk,aA
120, 45, 20, +, 25, 15, - , + , *
Q 19) Identify the following devices ? 3
fuEufyf[kr devices dh igpku djsa
(I) An intelligent device that connects several nodes to form a network and
redirects the received information only to intended nodes.
,d cqf}eku midj.k tks usVodZ cukus ds fy, dbZ uksMksa dks tksM+rk gS vkSj
izkIr tkudkjh dks dsoy bfPNr uksM ij iqufunsZf'kr djrk gSA
(II) A device that regenerates the received signal and retransmits it to its
destinations.
,d midj.k tks izkIr flXuy dks iqu% mRiUu djrk gS vkSj bls vius xarO;
rd iqu% izlkfjr djrk gSA
(III) Network device which connects dissimilar network (different protocols).
usVodZ fMokbl tks vleku usVodZ ¼fofHkUu izksVksdkWy½ dks tksM+rk gSA

Q 20) Write the names and syntax of any three commands of SQL? 3
SQL ds fdUgha rhu dekaM ds uke vkSj flaVSDl fyf[k,A

Long Answer Type Question

Q 21) Write an algorithm to convert INFIX EXPRESSION to POSTFIX EXPRESSION? 4


INFIX EXPRESSION dks POSTFIX EXPRESSION esa cnyus ds fy, ,d ,YxksfjFe
fy[ksa
OR/ vFkok
Write an algorithm for push and pop operations on stack.
stack ij iq'k vkSj ikWi vkWijs'kal ds fy, ,d ,YxksfjFe fy[ksaA

Q 22) Write the use and syntax for following methods : 4


fuEufyf[kr methods ds fy, mi;ksx vkSj flaVSDl fy[ksa
(I) open() (II) read() (III) seek() (IV) dump()

Q 23) Write a program to get student data (roll no. , name and marks ) from
user and write onto a binary file. The program should be able to get data
from the user and write on to the file as the use wants. 4

5
mi;ksxdrkZ ls student data (roll no. , name and marks ) izkIr djus ds fy,
,d izksxzke fy[ksa vkSj ,d ckbujh Qkby ij fy[ksaA izksxzke mi;ksxdrkZ ls MsVk
izkIr djus vkSj Qkby ij fy[kus esa l{ke gksuk pkfg,
OR/ vFkok
Write a program to create a Stack for storing only odd numbers out of all
the numbers entered by the user .Display the content of the stack along
with the largest odd numbers in the Stack
mi;ksxrkZ }kjk ntZ dh xbZ lHkh la[;kvksa esa ls dsoy odd numbers dks store
djus ds fy, ,d LVSd cukus dk izksxzke fy[ksa tks LVSd esa lcls largest odd
numbers ds lkFk LVSd ds content iznf'kZr djsa

Q 24)
(l) What is network Topology briefly explained types of Topology ? 2
usVodZ VksiksykWth D;k gS ? la{ksi esa VksiksykWth ds izdkjksa ds ckjs esa le>kb,
(ll) What is computer virus ? Write the name of any two viruses ? 2
dEI;wVj ok;jl D;k gS ? fdUgha nks ok;jl ds uke fyf[k, ?

Q 25)
(l) Differentiate between CHAR and VARCHAR datatypes . 2
CHAR vkSj VARCHAR MsVk Vkbi ds chp varj crkb,A
(ll) Differentiate between COUNT() and COUNT(*) functions in SQL with
appropriate example. 2
mi;qDr mnkgj.k ds lkFk SQL esa COUNT() vkSj COUNT(*) QaD'ku ds chp
varj le>kb,
Q 26) Case study based question. 4
A departmental store MyStore is considering to maintain their inventory
using SQL to store the data . As a database administer ,Abhay has
decided that :
,d fMikVZesaVy LVksj MyStore MsVk LVksj djus ds fy, SQL dk mi;ksx djds
viuh bUosaVªh cuk, j[kus ij fopkj dj jgk gSA MsVkcsl administer ds :Ik esa]
vHk; us fu.kZ; fy;k gS fd %
 Name of the database -mystore
 Name of the table - STORE
 The attributes of STORE are as follows:
ItemNO. : numeric ; Item Name : charater of size 20;
Scode : numeric ; Quantity : numeric

TABLE : STORE
6
Item No. Item Name Scode Quantity
2005 Sharpener Classic 23 60
2003 Ball Pen 0.25 22 50
2002 Get Pen Premimum 21 150
2006 Get Pen Classic 21 250
2001 Erasre Small 22 220
2004 Eraser Big 22 110
2009 Ball Pen 0.5 21 180

(l) Identify the attribute best suitable to be declared as a primary key.


primary key ds :i esa ?kksf"kr fd, tkus ds fy, lcls mi;qDr attribute dh
igpku djsa
(ll) Write the degree and cardinality of the table STORE.
table STORE dh fMxzh vkSj dkfMZuSfyVh fy[ksaA

(lll) Insert the following data into the attributes Item NO. , Item Name and
Scode respectively in the given table STORE.
nh xbZ table STORE esa dze'k% attributes Item NO. , Item Name and Scode
esa fuEufyf[kr MsVk MkysaA
ItemNO.=2010 ,ItemName = “Note Book” and Scode=25
(IV) Abhay wants to remove the table STORE from the database MY Store .
Which command will he use from the following :
vHk; table STORE dks MsVkcsl MY Store ls gVkuk pkgrk gSA og fuEufyf[kr
esa ls fdl vkns'k dk iz;ksx djsxk%
(I) DELETE FROM store ; (II) DROP TABLE store ;
(III) DROP DATABASE mystore ; (IV) DELETE store FROM my store;

******************

You might also like