Class 11 - I Terminal Exam Final Paper-Answer Key
Class 11 - I Terminal Exam Final Paper-Answer Key
Ans X = AB . (𝑩̅ + C)
6. Which shape represents a decision in a flowchart? [1]
a) A parallelogram b) A diamond c) An oval d) A rectangle
Ans b) A diamond
7. Python is an _____________ language because Python does not need to be [1]
compiled before it is run.
Ans Interpreted
8. Identify the tokens in the given statement: [1]
Num = int( input('Enter Value : '))
Ans Identifier - Num, int , input literal – ‘Enter Value’
Operator - = Punctuator – ()
9. Write the output of the following: [1]
p = 10
q=20
1
p*=q//3
q+=p-q**2
print(p , q)
Ans 60 -320
10. Evaluate the following expression: [1]
a = (3.5*2//5+10/2*3+(not(2**5/2*3)))
Ans 16.0
11. Name the datatype used to represent the following data. [1]
i) Leap year iii) Gender of the student
ii) PI value iv) Website address
Ans i) Integer
ii) String
iii) Float
iv) String
12. Rewrite the following expression into Python expression: [1]
𝑥
a) 𝑤𝑥−𝑦 2 b) d=√𝑥 2 + 𝑦 2
Ans a) X / (W*X – Y ** 2) b) d == math.sqrt(X**2 + Y**2)
13. Which of the following Python code will give different output from the others? [1]
A. for i in range(0,5): B. for j in [0,1,2,3,4]:
print(i) print(j)
2
Ans a) ‘Fantabulous’.find(‘tab’) → 3
b) ‘Adapt’.replace(‘a’,’o’) → Adopt
Q17 & 18 are ASSERTION AND REASONING based questions. Mark the correct choice as:
a) Both A and R are true and R is the correct explanation of A
b) Both A and R are true and R is not the correct explanation of A
c) A is True but R is False
d) R is True but A is False
17. ASSERTION: Both break and continue are jump statements. [1]
REASONING: Both break and continue can stop the iteration and hence it can
substitute one another.
Ans A is True but R is False
18. ASSERTION: Operators + and * can work with both number and String [1]
REASONING: Unlike number, + is referred as concatenation operator and * is
referred as replication operator.
Ans Both A and R are true and R is the correct explanation of A
Section - B
19. Convert the following numbers to decimal numbers as directed: [2]
(CAB3)16 - (_____________)8
(241)8 – (______________)10
Ans 1452638 16110
20. Add the following decimal in its binary form: [2]
(345)10 + (420)10 = (________________)2
Ans 10111111012
21. Draw the logical circuit of the following expression: [2]
F= ABCD + 𝐴̅𝐵̅ CD + A𝐵̅ C𝐷 ̅ + ̅̅̅̅̅̅̅̅
𝐴𝐵𝐶𝐷
Ans Usage of appropriate Gates
22. Draw a flow chart to print the squares of first n natural numbers. [2]
Ans Correct logic with Appropriate shapes
23. What is Type casting? Write an example for Implicit and Explicit type conversion. [2]
(or)
Explain Mutable and Immutable datatype with an example. What do you understand
by the term ‘Immutable’?
Ans Explicit conversion of an operand to a specific type is called as type casting.
Implicit type conversion – a = a / 5
Explicit type conversion – a = float(a+5)
The immutable types are those that can never change their value in place and
mutable types are those values can be changes in place. (1 mark)
Example:
Appropriate example (1/2 mark)
3
Immutable means unchangeable; the values cannot be changed in place.
When a value of a variable refererring to a immutable changes the reference
also changes. (1/2 mark)
24. The following program is to find and print the factors of a given number. Some [2]
statements are missing. Fill the blanks and complete the program:
no = ____________ ("Enter the number"))
for ____________ (2, no//2+1):
if no % i ==0:
print (______, "is the factor of " , _____)
Ans no = int(input ("Enter the number"))
for i in range(2, no//2+1):
if no % i ==0:
print (i, "is the factor of " , no)
25. Write a program to accept a string and do the following: [2]
a) Count number of vowels
b) Replace all uppercase letters with ‘$’
Ans s = input('Enter a string')
v=0
for i in s:
if i in 'aeiouAEIOU':
v+=1
print("No of Vowels in string ", v)
s = input('Enter a string')
ns = ''
for i in s:
if i.isupper():
ns = ns + '$'
else:
ns = ns + i
print("New String : ", ns)
Section : C
26. ̅̅̅̅̅̅̅) ((𝐴𝐵)
̅̅̅̅̅̅̅+B𝐶̅ ). [3]
Given the Boolean expression (A+𝐵̅ +C) (A+(𝐵𝐶)
Obtain the Truth Table and draw the Logical circuit.
Ans
27. What will be the output of the following? [3]
a. 23//4 + 2**3**(2%3) d. ‘Good’ * 2 + ‘News’
b. not True or False and True e. 5>2 and not(10>11)
4
c. 78 > 2 or 100 f. ‘Cat’ > ‘dog’
Ans 517 'GoodGoodNews'
False True
True False
28. Write a Python program to calculate the compound interest. The principal, rate of [3]
interest and time must be entered by the user.
(Formula: Compound Interest = Principal (1 + Rate/100)Time )
5
Percentage of Mark Grade
Above 90% A
80% - 90% B
70% - 80% C
60% - 70% D
Below 60% E
ii. Write a program to read a two digit number and check whether the number [2]
is an even or odd number and display appropriate message.
Ans i) Correct logic (getting value – ½ mark; correct conditions ½ mark each)
ii) 9 < No <100 (1 mark) ; no % 2 == 0 (1/2 mark) message (1/2 mark)
32. Write a program to perform arithmetic operations on two given integers based on [5]
the choice of the user. (Like calculator)
Ans Correct logic - 1
loop – 1 mark; conditions (6) – (1/2 mark for each);
33. Consider the following string: [5]
myLang = "Machine Language"
What will be the output of the following string operations: (Attempt any 5)
(i) print(myLang[::-3])
(ii) print(3 * myLang[8:])
(iii) print(myLang.isalpha())
(iv) print(myLang.startswith('Mach'))
(v) print(myLang.capitalize())
(vi) print(myLang.split('a'))
(vii) print(myLang.partition('e'))
Ans i. euaehM
ii. LanguageLanguageLanguage
iii. False
iv. True
v. Machine language
vi. ['M', 'chine L', 'ngu', 'ge']
vii. ('Machin', 'e', ' Language')
Section: E
34. i) In the following code snippet, identify the type of error occurs, underline and [2]
rewrite the statement correctly.
a = b = 30 , 40
a += 5
If a=b:
print ('A and B are equal')
else b>=a:
print ('B is the biggest number')
else:
print('A is the biggest number')
6
ii) Observe the code carefully and answer the following questions: [2]
n=7
c=0
while(n):
if(n>5):
c=c+n-1
n=n-1
else:
break
print(n)
print(c)
a) 5
b) Infinite Loop
35. Write a python program to accept a line of text and do the following operations: [4]
Sample text: ‘My IP Address 108.045.11.01’
a) Swap space and dot in the string
b) Reverse the word which contains length in multiples of 2
c) Count the number of digits.
d) Remove all the character except a specified character in a given string.
(if the given character is ‘0’ then it should display the output as ‘000’)
Ans Correct logic
**************************