0% found this document useful (0 votes)
21 views

xi_computer science.doc-M

Uploaded by

laluku99968
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)
21 views

xi_computer science.doc-M

Uploaded by

laluku99968
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/ 19

No.

of pages - 19 (M)
MARKING SCHEME
MID-TERM EXAMINATION (2024-25)
CLASS : XI
SUBJECT: COMPUTER SCIENCE (083)
Time Allowed : 3 hours Maximum Marks : 70

GENERAL INSTRUCTIONS:
Please check this question paper contains 35 questions.
 The paper is divided into 5 Sections- A, B, C, D and E.
 Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
 Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
 Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
 Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
 Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
 All programming questions are to be answered using Python Language only.

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

SECTION A
(1 mark to be awarded for every correct answer)

1. State True or False. 1


RAM is an example of volatile memory.

Ans. TRUE

2. Which language translator converts high-level language code into 1


machine code all at once?

a) Interpreter b) Assembler
c) Linker d) Compiler

Ans. (d). Compiler

1 XI-COMPUTER SC.-M
3. Which of the following is an example of membership operator in 1
Python?

a) is b) in
c) and d) or

Ans. (b) in

4 Which of the following is an extension of python? 1

a) .txt b) .dat
c) .py d) .python

Ans. (c) .py

5 What will be the output of the of the following code: 1

print(‘2’ + ‘3’)

a) 5 b) 23
c) 22333 d) error

Ans. (b) 23

6. Which function is used to print a message to console in Python? 1

a) print( ) b) display( )
c) show( ) d) message( )

Ans. (a) print( )

7 Which of the following logic gate can be used to invert the output of an 1
OR gate?

a) XOR b) XNOR
c) NAND d) NOR

Ans. (d) NOR

2 XI-COMPUTER SC.-M
8 Which of the following is a valid variable name in Python? 1
a) if b) or
c) _not d) roll no
Ans. (c) _not

9 input( ) function by default returns the data in ________ data type. 1

a) integer b) boolean
c) string d) list

Ans. (c) string

10 Shailja is a good programmer and she wants to find out a number 93 is 1


divisible by 7 or not. Help her to complete the code by fill in the blank.

a) a//7==0 b) a%7==0
c) a/7==0 d) a**7==0

Ans. (b) a%7==0

11 Which operator from following expression has highest precedence? 1


2+3-1*2**3**2
a) ** b) +
c) - d) All of them have equal precedence

Ans. (a) **

3 XI-COMPUTER SC.-M
12 Which of the following statement will give error? 1

A = “hello’ #statement 1

7!=10 #statement 2

true = True #statement 3

roll_no=”hello world” #statement 4

a) statement 1 b) statement 2
c) statement 3 d) statement 4

Ans. (a) statement 1

13 How many unique symbols are used to represent hexadecimal number? 1

a) 2 b) 8
c) 10 d) 16

Ans. (d) 16

14 _________ in Python stores items in the form of key-value pairs. 1

a) integer b) list

c) tuple d) dictionary

Ans. (d) dictionary

15 What will be the data type of variable named addition in the following 1
program?

a) integer b) float
c) list d) None of the above

Ans. (b) float

4 XI-COMPUTER SC.-M
16 What type of error will occur if you try to access an undefined variable 1
in python?

a) Syntax error b) Logical error


c) Runtime error d) No error

Ans. (c) Runtime error

Assertion and Reason:


In the following questions, A statement of Assertion (A) is followed
by a statement of Reason (R). Mark the correct choice as:
A) Both A and R are true and R is correct explanation of A
B) Both A and R are true but R is not correct explanation of A
C) A is true but R is false
D) A is false but R is true

17 Assertion (A): A compiler translates high level language code into 1


machine code.

Reason (R): A compiler processes the code line by line and generates
an executable file.

Ans. (c) A is true but R is false.

18 Assertion (A): Python uses dynamic typing 1

Reason (R): Variables in python can change type during execution


based on the assigned value.
Ans. (a) Both A and R are true and R is correct explanation of A

5 XI-COMPUTER SC.-M
SECTION B

19. What do you mean by literals in Python with example. 2

Ans. A literal is a notation for representing a fixed value directly in


the code. Literals are the raw data given in a variable or constant.

Examples.
1 Marks
1. String Literal (a= “Hello World”) for
2. Integer Literal (a=10) definitio

3. Special Literal (a=None) n. and ½


mark for
4. Boolean Literal (a=True)
each
etc. example
OR upto 2
literals.
What do you understand by relational operator? Name any two
relational operators.

Relational Operator: Relational operators in Python are used to


compare the values of two operands. The result of a relational 1 mark
operation is a Boolean value: either True or False. for
Relational operators are: relational
operator
definitio
n and ½
mark for
each
operator
upto 2
operators
.

6 XI-COMPUTER SC.-M
20. Rahim, a student of class 11, is writing a code in Python to identify the 2

largest number between two numbers. He has written the following code

but his code is having errors. Rewrite the correct code and underline the ½ mark

corrections made. for each

error

correctio

Ans.

21 What will be the output of following statement: 2 marks

(2-6+3**2*3)+7 for

correct
Ans. 30
answer

OR

Use parenthesis to yield result as 3.5, for the following Python code :

4//2*3+5/2+1

Ans. 4//1 (2*3) + 5/2+1

7 XI-COMPUTER SC.-M
22 What is the output of the following code? 2 marks
for
correct
answer

Ans. 14

23 Write a program in Python that takes name and age as input from the 2
user and if age is greater than or equal 18 then print “YOU ARE
ELIGIBLE FOR VOTING” otherwise print “YOU ARE NOT
ELIGIBLE FOR VOTING”.

CODE

½ mark for name


input

½ mark for age input

1 mark for correct if statement

OR
Write a program in Python that takes two numbers as an input from the
user and check whether 1st number is completely divisible by 2nd number
or not. print “Valid Number” if number is completely divisible
otherwise print “Invalid Number”

CODE

½ mark for input 1st


number
½mark for input 2nd
number
1 mark for correct condition

8 XI-COMPUTER SC.-M
24 Find the binary equivalent of (456)8. 2

Ans. (100101110)2

OR

Find the hexadecimal equivalent of (110101100)2.

Ans. 1 AC

25 Find the output of the following Python code: 2

Ans.

½ mark for each correct value in output

SECTION C

26 Find the output of the following Python code: 3

a=5
while a<24:
for b in range (2, 8, 4) :
print (a+b, end = " ")
a=a+9
Ans. 7 11 16 20 25 29

1/2 marks for each correct value in the output

9 XI-COMPUTER SC.-M
27 Some common syntax errors are parenthesis mismatch, misspelled 3
keyword, incorrect indentation. Briefly explain each mentioned
syntax error with example. ½ mark
parenthes
Ans.
is
Parenthesis mismatch: This error occurs when there is an opening mismatc
parenthesis ( without a corresponding closing parenthesis ), or vice h
versa. definitio
n and ½
Ex. A=input(“Enter the name”
mark for
Misspelled keyword: This error occurs when a reserved keyword in its
Python is misspelled. Python keywords are case-sensitive and need example.

to be spelled correctly.
½ mark
Ex. prt(“hello world”) it should be print instead of prt. for
Incorrect Indentation: Python uses indentation to define the scope misspelle
d
of loops, functions, classes, and conditional statements. Incorrect
keyword
indentation can lead to syntax errors.
definitio
Ex. n and ½
mark for
if a>10:
its
print(“a is greater than 10”) example

½ mark
for
incorrect
indentati
on and ½
mark for
its
example.

10 XI-COMPUTER SC.-M
28. Consider below given expressions, what will be the final result and final 3x1=3

data type?

(i) a,b=100,50

c=a/b ½ mark

for correct
Ans. 2.0 and float
output and
(ii) a,b=5,3
½ marks
c=a**b
for correct
c=float(c) data type

Ans. 125.0 and float for each

part.
(iii) a,b=5.7,6

c=int(a)+b

Ans. 11 and int

OR

What will be the output of the following statements when the input is

a=“hello”, b=“world”, c= “3”

(i) print(a+b)

Ans. helloworld

(ii) print(a+c)
1 mark for
Ans. hello3 each

(iii)print(b+int(c)) correct

result
Ans. Error

11 XI-COMPUTER SC.-M
29 Write short note on following: 3*1=3

(i) Assembler
1 marks
Ans: An assembler converts assembly language code into machine
for each
code, enabling low-level hardware control for efficient execution.
correct
(ii) Compilers definition
Ans: A compiler is a language translator that converts high level
language into low level language at once. It shows all errors
together with line number. Once all errors are corrected and object
code is created, compiler is no more required in memory.

(iii) Interpreter

Ans: An Interpreter is a language translator that converts high


level language into low level language line by line, instead of
converting the entire code at once. It stops at the line where error is
found and requires rectification of same to move forward. It is
always required in memory.

30 Write a Python program to print the following pattern: 3


1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

CODE

1 mark for each


correct loop and ½
mark for each print
statement.

(Same marks distribution for equivalent code)

12 XI-COMPUTER SC.-M
SECTION D

31 (i) Draw a flow-chart to print all the numbers between 1 to 100 which 2x2=4
are either divisible by 4 or 6.

FLOWCHART

1 mark for correct shape

½ mark for each correct


decision condition.

(ii) Write a program in python to print all the numbers between 1 to 100
which are either divisible by 4 or 6.

CODE

1 mark for correct loop


and 1 mark for correct if
condition

32 (i) Write a program in Python to take a number input from the user and 2x2=4
calculate factorial of a number.

CODE

½ mark for input from


user, 1 mark for
correct loop condition
and ½ mark for result

13 XI-COMPUTER SC.-M
(ii) Write a program in python that takes two numbers as input from the
user and calculate LCM of those numbers.

CODE

½ mark for input


from user, 1 mark for
correct if condition
and ½ mark for
correct output

SECTION E

33. Shubham, a student of class 11 is designing a circuit diagram. Help her 5 x 1 =5


to get the output out of it at different stages.

(i) What will be the output of Q1?


Ans. A.B
(ii) What will be the output of Q2?
Ans. B+C
(iii) What will be the output of Q3?
Ans. B.C
(iv) What will be the output of Q4?
Ans. (B+C).(B.C)
(v) What will be the output of Q?
Ans. ((A.B)+((B+C).(B.C)))

14 XI-COMPUTER SC.-M
34. (i) Explain membership operator with example. 2+3=5
Ans. Membership operators: Membership operators are used to
test if a value is found within a sequence such as a string, list, 1 mark
tuple, or dictionary. Python has two membership operators: in for
and not in definitio
1. in Operator: Returns True if the specified value is found in n and 1
the sequence. mark for
Ex. “a” in “apple” it will return True example.
2. not in Operator: Returns True if the specified value is not
found in the sequence.
Ex. “a” not in “apple”. It will return False

(ii) Write a program in Python to input the value of x and n and


generate the series and result of series:

where n is an integer.

For example if input is x = 2 and n = 5

The result should be 17.66666666

Code

1/2 mark for input


1 mark for correct
loop i.e. starting and
ending
1 mark for
computation
1/2 mark for printing
result

15 XI-COMPUTER SC.-M
OR

(i) Write down the difference between = and == operators in python.

= ==

1. = is used in variable 1. == is used for


assignment. comparison.

2. = is used to store the 2. == returns a Boolean


value into the variable result.

3. i.e. a=10 3. a==10 (it will compare a


with 10 and returns value
either True or False) 1 mark
for each
correct
differenc
(ii) Write a program in python to print all the tables between 2 to 10 e. Upto 2
(including both). marks.

CODE

1 mark
for
correct
condition
in each
loop and
1 mark
for
correct
print
statement

16 XI-COMPUTER SC.-M
35 Kanak is a Python programmer who is working on a program that will 1 mark
take three integer numbers as input and finds out largest among them for each
and also all the possible conditions. Help her to complete her code. correct
answer
1x5=5

(i) Write a suitable condition to check “a” is the largest number, in the
blank space marked as Statement 1.

Ans. if a>b and a>c:

(ii) Write a suitable condition to check “b” is the largest number, in


the blank space marked as Statement 2.

Ans. elif b>a and b>c:

(iii) Write a suitable condition to check “c” is the largest number, in the
blank space marked as Statement 3.

Ans. elif c>a and c>b:

(iv) Write a suitable condition to check “a” and “b” both are equal and
greater than “c”, in the blank space marked as Statement 4.

Ans. elif a==b and a>c:

(v) Write a suitable condition to check “a” and “c” both are equal and
greater than “b”, in the blank space marked as Statement 5.

Ans. elif a==c and a>b:

17 XI-COMPUTER SC.-M
OR 1 mark
Ekta is a student of class 11th who is working on a program that will for each
print all the prime numbers between 2 to 100 (including both). Help her correct
to complete her code. answer
1x5=5

(i) Write a suitable condition to run “for” loop for identifying prime
numbers starting from 2 till 100 (including both), in the blank
space marked as statement 1.

Ans: 2,101:

(ii) Write a suitable condition “for” loop for checking condition


required (number excluding 1 and number itself) for prime
number, in the blank space marked as statement 2.

Ans: 2,i

(iii) Write a suitable condition to check if a number given by variable


‘i’ is completely divisible by ‘j’ or not because if a number is
completely divisible by any number between 2 and number itself
(excluding number itself) than it can’t be a prime number, in the
blank space marked as statement 3.

Ans: i%j==0

(iv) Write a suitable statement to terminate the loop because if a


number is completely divisible by any number between 2 and
number itself (excluding number itself) than it can’t be a prime
number. So, terminate the current loop, in the blank space marked
as statement 4.

18 XI-COMPUTER SC.-M
Ans.: break

(v) Write a suitable condition to check whether ‘flag’ is 0 or not.


Because if ‘flag’ is zero then only that number can be prime as per
statements written in the program. So, fill the blank space marked
as statement 5.

Ans: flag==0

19 XI-COMPUTER SC.-M

You might also like