CBSE Sample Paper for Class 11 Computer Science - Set A

Share Embed Donate


Short Description

For All CBSE Sample Papers for Class 11 English visit: http://schools.aglasem.com/?p=38388 For All CBSE Sample Papers...

Description

AglaSem Schools

Sample Question Paper–A 1. (a) PROM-Programmable Read Only Memory. (b) William Bradford Shockley introduced the concept of Transistors. (c) Relational Database Management System (d)

Low Level Language

(1) (1) (1)

High Level Language

1.

The programming is done in binary.

2.

Programs are machine specific

The programming is done in human understandable language Programs are machine independent (1 mark for each difference)

m o

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

.c

m e s

a l g

a . s

l o o

h c s

.

w

w

w

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)

(d) (i) (ii) (iii) (iv)

AglaSem Schools (1)

109 100101110111 747402 1111101

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

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.

!=

.c

m e s

(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) (d) Four functions performed by compression tools are:

a l g

a . s

l o o

m o

(a != b) is true.

(2)

(3)

(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

.

h c s

w

w

w

AglaSem Schools 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)

m o

.c

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

em

(b) a=10, b=30 (c) Defining a Function

(1) (1)

s a l

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

g a .

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.

s l o

o h c

.s

w

Syntax :

w

def functionname( parameters ): “function_docstring” function_suite return [expression]

w

(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

AglaSem Schools

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

m o

.c

m e s

a l g

a . s

l o o

h c s

.

Line

Code

w

w

1

alphabet = “abcdefghij’’

2

slice1 = alphabet[1:3]

w

3. slice2 = alphabet[3]

Meaning Making an alphabet variable. Slicing from subscript 1 thru subscript 2. slice1 = ‘bc’ Slicing from subscript 0 (empty beginlndex) through subscript 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)

AglaSem Schools

(b)

Main Memory

CPU

Buses

Input Devices

Auxiliary Storage

Output Devices

Input-Output System (2) (c) #program to find factorial of a number n=int(raw_input(‘Enter the number ‘)) fact = 1

m o

.c

while n : fact = fact * n n=n-1 print “Factorial of number is “,fact (d) line 1 : def sin(x,n) : line 2 : for (i in range[n]):

m e s

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

la

ls

o o

h c s

.

w

w

w

g a .

(2)

(3)

qq

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF