CLASS XI (COMPUTER SCIENCE) HALF YEARLY MS BHOPAL Region

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

KENDRIYA VIDYALAYA SANGATHAN

CLASS XI - HALF YEARLY EXAMINATION SAMPLE PAPER – 2019-20


SUBJECT: COMPUTER SCIENCE
MARKING SCHEME
Time: 03:00 Hrs. Max: 70
,
1. (a) PROM-Programmable Read Only Memory. (1)
(b) RAM is known as volatile memory when we switch off power the data stored are vanished (1)
(c) BITS ,NIBLLE ,BYTES,KB ,MB,GB,TB,PB (1)

(d) Low Level Language High Level Language


1. The programming is done in binary. The programming is done in human
understandable language
2. Programs are machine specific Programs are machine independent

(1 mark for each difference)


(e) (i) Real-time : A real-time operating system is a multitasking operating system that aims at
executing real-time applications. Real-time operating systems often use specialized scheduling
algorithms so that they can achieve a deterministic nature of behavior. The main objective of real-
time operating systems is their quick and predictable response to events. They have an event-
driven or timesharing design and often aspects of both. An event-driven system switches between
tasks based on their priorities or external events while time-sharing operating systems switch
tasks based on clock interrupts.
(ii) Multi-user : A multi-user operating system allows multiple users to access a computer system
at the same time. Time-sharing systems and Internet servers can be classified as multi-user
systems as they enable multiple-user access to a computer through the sharing of time. Single-user
operating systems have only one user but may allow multiple programs to run at the same time.
(iii) Distributed : A distributed operating system manages a group of independent computers
and makes them appear to be a single computer. The development of networked computers that
could be linked and communicate with each other gave rise to distributed computing. Distributed
computations are carried out on more than one machine. When computers in a group work in
cooperation, they make a distributed system.
(iv) Embedded : Embedded operating systems are designed to be used in embedded computer
systems. They are designed to operate on small machines like PDAs with less autonomy. They are able
to operate with a limited number of resources. They are very compact and extremely efficient by
design. Windows CE and Minix 3 are some examples of embedded operating systems. (2)
OR
An Operating System (OS) is an interface between a computer user and computer
hardware. An operating systemis a software which performs all the basic tasks like file
management, memory management, process management, handling input and
output, and controlling peripheral devices such as disk drives and printers.
(2)
( e) one marks for correct definition 1
(f) one marks for computer system diagram and one marks for naming different units
Q2
(a) Computer memory is categorized into primary and secondary memory. While primary memory is
the main memory of the computer which is used to store data or information temporarily,
whereas secondary memory refers to external storage devices that are used to store data or
information permanently. (2)
(b) MIMD-Multiple Instruction and Multiple Data : MIMD computer system has a number of independent
processors operate upon separate data concurrently. (2)
(c) math.cos(x) returns the cosine value of the entered number.
Example: math.cos(60) returns 0.5 (2)
OR
Keywords are special words which are reserved and have a specific meaning. Python
has a set of keywords that cannot be used as variables in programs
Eg. Def,import,True,del
Python Identifiers are user-defined names to represent a variable, function, class,
module or any other object. If you assign some name to a programmable entity in
Python, then it is nothing but technically called an identifier.
Eg shapeClass, shape_1
(d) (i) 109
(ii) 100101110111 (1)
(iii) 747402 (1)
(iv) 1111101 (1)

3. (a) Static Binding

 At translation
— Determined by programmer — bind type to variable name, value to constant.
— Determined by translator — bind global variable to location (at load time), bind source
program to object program representation. (2)
OR
1 mark for definition and 1 mark for example
(b) Assume variable a holds 10 and variable b holds 20 then:

Operator Description Example


== Checke if the value of two operands are equal (a == b) is not true.
or not, if yes then condition becomes true.

!= Checks if the value of two operands are equal (a != b) is true.


or not, if values are not equal then condition
becomes true.
(2)
OR
1 mark for each difference(Minimum 2 differences)

(c) ABC+ABC+ABC+ABC+ABC
=BC(A+A)+AB(C+C)+AB(C+C)
=BC+AB+AB
=AB+B(A+C) (3)
(d) Four functions performed by compression tools are:
(i) Reduce the file size
(ii) Provides faster access
(iii) Makes file transfer easy over web (due to small file size)
(iv) Prevents any data loss in files. (4)
4. (a) List is a data structure to store homogeneous data. Like string indices, list indices start at 0, and
lists can be sliced, concatenated and so on:
>>> a[0]
‘spam’
>>> a[3]
1234
>>> a[-2]
100
>>> a[1:-1]
[‘eggs’, 100]
>>> a[:2] + [‘bacon’, 2*2]
[‘spam’, ‘eggs’, ‘bacon’, 4]
>>> 3*a[:3] + [‘Boe!’]
[‘spam’, ‘eggs’, 100, ‘spam’, ‘eggs’, 100, ‘spam’, ‘eggs’, 100, ‘Boe!’] (2)
(b) input() is used to get string input while raw_input() is used to get integer input.
Example:
>> name=input(‘Enter a Name’)
>>age=raw_input (‘Enter Age’) (2)
(c) Python basically has three datatypes: dict, list and set
list([iterable]) : Return a list whose items are the same and in the samitems. iterable may be either a
sequence, a container that supports iteration, or an iterator object.
class dict(iterable, **kwarg)
Return a new dictionary initialized from an optional positional argument and a possibly empty set of
keyword arguments.
class set([iterable])
Return a new set or set object whose elements are taken from iterable. The elements of a set must
be hashable. To represent sets of sets, the inner sets must be frozenset objects. If iterable is not
specified, a new empty set is returned. (3)
(d) (i) math.ceil(x)
Return the ceiling of x as a float, the smallest integer value greater than or equal to x.
(ii) math.fabs(x)
Return the absolute value of x.
(iii) math.floor(x)
Return the floor of x as a float, the largest integer value less than or equal to x.
(iv) math.factorial(x)
Return x factorial. Raises ValueError if x is not integral or is negative. (4)
OR
1 mark for definition and 1 for example
ii) 1 mark for definition and 1 for example

5. (a) for and while loops are supported in python (1)


(b) a=10, b=30

OR

(1)
(c) Defining a Function
You can define functions to provide the required functionality. Here are simple rules to define a function
in Python:
 Function blocks begin with the keyword def followed by the function name and
parentheses ( ( ) ).
 Any input parameters or arguments should be placed within these parentheses. You can also
define parameters inside these parentheses.
 The first statement of a function can be an optional statement - the documentation string of the
function or docstring.
 The code block within every function starts with a colon (:) and is indented.
 The statement return [expression] exits a function, optionally passing back an expression to the
caller. A return statement with no arguments is the same as return None.
Syntax :
def functionname( parameters ):
“function_docstring” function_suite
return [expression]
(d) x = 0
while True: try:
x = int(raw_input(‘input a decimal number \t’)) if x in
xrange(1,1000000001):
y = bin(x) rev
= y[2:]
print(“the reverse binary soln for the above is %d”) %(int(‘0b’+rev[::-1],2)) break
except ValueError:
print(“Please input an integer, that’s not an integer”)
continue (3)
(e) Name Symbol Use in flowchart

Oval Denotes the beginning or end a program.

Flow line Denotes the direction of logic flow ina


program.

Parallelogram Denotes either an input operation (e.g.,


INPUT) or an output operation (e.g., Print)

Rectangle Denotes a process to be carried out (e.g., an


addition)

Diamond Denotes a decision (or branch) to be made. The


program should continue along one of two
routes (e.g., IF/THEN/ELSE)

(4)

OR

A flowchart is a type of diagram that represents an algorithm, workflow or process. The flowchart shows the
steps as boxes of various kinds, and their order by connecting the boxes with arrows. This diagrammatic
representation illustrates a solution model to a given problem. Flowcharts are used in analyzing, designing,
documenting or managing a process or program in various fields.

6. (a) isdigit() checks if entered character is a digit. Returns false otherwise.


isalpha() checks if entered character is a alphabet. Returns false otherwise. (1)
(b) Keywords are reserved words that are used for special purpose in a program provided by the
programming language.
Some of the keywords in Python are: and
assert
break class
continue
def (2)
(c) When you want to extract part of a string, or some part of a list, you use a slice. Other languages
use the termsubstring for a string slice, and may have no mechanism for extract a list slice.
Python’s slice syntax is easy and elegant:
slicedString = aString[beginIndex:endIndex]
slicedList = aList[beginIndex:endIndex] Slices
Examples

Line Code Meaning


1 alphabet = “abcdefghij’’ Making an alphabet variable.
Slicing from subscript 1 thru subscript 2.
2 slice1 = alphabet[1:3]
slice1 = ‘bc’
Slicing from subscript 0 (empty beginlndex) through subscript
3. slice2 = alphabet[3]
slice2 = ‘abc’
(3)
(d) (i) Large uniform register set
(ii) minimal number of addressing modes
(iii) no/minimal support for misaligned accesses
(iv) Fixed length instructions (4)
7.
(a) 2 marks for correct program.

(b) 1 mark for writing correct law and 1 mark for verifying using truth table
(2)
(c) #program to find factorial of a number
n=int(raw_input(‘Enter the number ‘)) fact =
1
while n :
fact = fact * n
n=n-1
print “Factorial of number is “,fact (2)

OR
a=int(input("Please Enter a Number : "));
if(a%2==0):
print("This Number is Even")
else:
print("This Number is Odd")

(d) line 1 : def sin(x,n) :


line 2 : for (i in range[n]):
line 3: sign=(-1)*i*i (3)

You might also like