Half Yearly Sample Paper Class 12 Computer Science Set 1 2022-23

Computer Science (083)

Time: 1:30 Hours/ Maximum marks:35

I. Choose the correct answer:8×1

1) Which of the following is a distinct syntactic block?

a) Subroutines

b) Function

c) Definition

d) Modules

 

2) The data type whose representation is unknown are called

a) Built in data type

b) Derived data type

c) Concrete data type

d) Abstract data type

 

3) Which of the following is used in programming languages to map the variable and object?

b):=

a) ::

d)==

c)=>

 

4) Two main measures for the efficiency of an algorithm are

a) Processor and memory

b) Complexity and capacity

c) Time and space

d) Data and space

 

5) Which of the following character is used to give comments in Python Program?

a) #

b) &

c) @

d) $

 

6) Choose the incorrect expression.

a) 100/10=0

b) 100% 10=0

c) 100 ||10 = 10

d) 10**1=10

 

7) Binary search can be done by algorithm..

a) Sequential

b) Divide and Conquer

c) Linear

d) Bubble

 

8) Identify the scope of the variable color in the following pseudo code.

color: Red

mycolor():

     b: Blue

mycolor()

print color

 

a) Local

b) Enclosed

c) Global

d) Built in

 

Part-II

II. Answer any four questions. Question number 13 is compulsory: 4×2=8

9) Define subroutine.

10) Differentiate Constructor and Selector.

11) What do you mean by Namespaces?

12) What are the two phases of analysis of Algorithm?

13) What is the value of min in min = 50 if 49 >50 else 70?

 

Part-III

III. Answer any three questions. Question number 17 is compulsory:

14) Define Pure and Impure functions.

15) What are the steps to do Dynamic Programming?

16) Explain the characteristics of an Algorithm.

17) Write the output of the following program.

x=5

y=6

print (“The sum of”, x, “and”, y, “is”, z)

 

Part-IV

IV. Answer all the questions: 2 x 5

18) Explain the types of scopes for variable.

Or

What are called Parameters and write a note on

(i) Parameter without Type

(ii) Parameter with Type

 

19) What is Binary search. Discuss with an example.

OR

Discuss in detail about Tokens in Python.

Copywrite © 2020-2024, CBSE Python,
All Rights Reserved