• No results found

CBSE Sample Paper for Class 11 Computer Science - Set A

N/A
N/A
Protected

Academic year: 2021

Share "CBSE Sample Paper for Class 11 Computer Science - Set A"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

1. (a) PROM-Programmable Read Only Memory. (1) (b) William Bradford Shockley introduced the concept of Transistors. (1)

(c) Relational Database Management System (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. (4)

2. (a) Level 1 Cache : Level 1 cache, often called primary cache, is a static memory integrated with processor core that is used to store information recently accessed by a processor. Level 1 cache is often abbreviated as L1 cache. The purpose of level 1 cache is to improve data access speed in cases when the CPU accesses the same data multiple times. For this reason access time of level 1 cache is always faster than access time of system memory. The processor may have additional level 2 and level 3 caches, albeit those caches are always slower then the L1 cache.

In modern microprocessors primary cache is split into two caches of equal size - one is used to store program data, and another is used to store microprocessor instructions. Some old microprocessors utilized “unified” primary cache, which was used to store both data

and instructions in the same cache. (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)

Sample Question Paper–A

www.schools.aglasem.com

(2)

(d) (i) 109 (1)

(ii) 100101110111 (1)

(iii) 747402 (1)

(iv) 1111101 (1)

3. (a) Static Binding l 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) (b) Assume variable a holds 10 and variable b holds 20 then:

Operator Description Example

== Checke if the value of two operands are equal or not, if yes then condition becomes true.

!= Checks if the value of two operands are equal or not, if values are not equal then condition becomes true.

(a == b) is not true.

(a != b) is true.

(2) (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

www.schools.aglasem.com

(3)

list([iterable]) : Return a list whose items are the same and in the same order as iterable’s items. 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)

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

(b) a=10, b=30 (1)

(c) Defining a Function

You can define functions to provide the required functionality. Here are simple rules to define a function in Python:

l Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ).

l Any input parameters or arguments should be placed within these parentheses. You can also define parameters inside these parentheses.

l The first statement of a function can be an optional statement - the documentation string of the function or docstring.

l The code block within every function starts with a colon (:) and is indented.

l 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)

www.schools.aglasem.com

(4)

(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) 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) System software is a type of computer program that is designed to run a computer’s

hardware and application programs. (1)

www.schools.aglasem.com

(5)

(b)

(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)

(d) line 1 : def sin(x,n) : line 2 : for (i in range[n]):

line 3: sign=(-1)*i*i (3)

qq

CPU Main Memory

Buses

Input Devices

Auxiliary

Storage DevicesOutput

Input-Output System

www.schools.aglasem.com

References

Related documents

1 Because of unavailability of road transport, they have less time to reach to station, that is why they have decided to took the shortest

Parents encourage their wards to these streams because of (i) Jobs oriented streams1. (ii) Develope a scientific

According to this theorem, the moment of inertia of a plane lamina about any axis OZ ⊥ to the plane of the lamina is equal to the sum of the moments of inertia of the lamina about

The head teacher told him that if he left the school on his own accord, the question of expulsion would not arise.. Albert asked for forgiveness for the crime he

He does not contribute any capital, does not share profits & losses of the business but has unlimited liability towards third parties to pay back the loans, given to the

Addiction towards mobile phones has severly effected their health and society life as they don’t want to deal with people face to face rather that opt to talk over mobile or just sent

(a) Since the motion of the train between two distant stations is smooth throughout so keeping in view the long distance covered between the two stations in reasonable duration of

On the other hand, when water is powered over oil, it does not spread over it because the surface tension of oil being less than that of water, it is not able to pull water over