xi_computer science.doc-M
xi_computer science.doc-M
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)
Ans. TRUE
a) Interpreter b) Assembler
c) Linker 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
a) .txt b) .dat
c) .py d) .python
print(‘2’ + ‘3’)
a) 5 b) 23
c) 22333 d) error
Ans. (b) 23
a) print( ) b) display( )
c) show( ) d) message( )
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
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
a) integer b) boolean
c) string d) list
a) a//7==0 b) a%7==0
c) a/7==0 d) a**7==0
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
a) statement 1 b) statement 2
c) statement 3 d) statement 4
a) 2 b) 8
c) 10 d) 16
Ans. (d) 16
a) integer b) list
c) tuple 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
4 XI-COMPUTER SC.-M
16 What type of error will occur if you try to access an undefined variable 1
in python?
Reason (R): A compiler processes the code line by line and generates
an executable file.
5 XI-COMPUTER SC.-M
SECTION B
Examples.
1 Marks
1. String Literal (a= “Hello World”) for
2. Integer Literal (a=10) definitio
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
error
correctio
Ans.
(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
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
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
8 XI-COMPUTER SC.-M
24 Find the binary equivalent of (456)8. 2
Ans. (100101110)2
OR
Ans. 1 AC
Ans.
SECTION C
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
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
part.
(iii) a,b=5.7,6
c=int(a)+b
OR
What will be the output of the following statements when the input is
(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
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
(ii) Write a program in python to print all the numbers between 1 to 100
which are either divisible by 4 or 6.
CODE
32 (i) Write a program in Python to take a number input from the user and 2x2=4
calculate factorial of a number.
CODE
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
SECTION E
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
where n is an integer.
Code
15 XI-COMPUTER SC.-M
OR
= ==
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.
(iii) Write a suitable condition to check “c” is the largest number, in the
blank space marked as Statement 3.
(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.
(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.
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:
Ans: 2,i
Ans: i%j==0
18 XI-COMPUTER SC.-M
Ans.: break
Ans: flag==0
19 XI-COMPUTER SC.-M