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

Computer Science

Xaviers delhi class 11

Uploaded by

AKSHAT GOYAL
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)
52 views

Computer Science

Xaviers delhi class 11

Uploaded by

AKSHAT GOYAL
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/ 4

ST.

XAVIER’S SENIOR SECONDARY SCHOOL, DELHI – 110 054


Class 11 Time: 3 hrs.
16-9-2023 MID TERM EXAMINATION - COMPUTER SCIENCE Max. Marks : 70
This question paper contains five sections, Section A to E.
1. All questions are compulsory.
2. Section A has 18 questions carrying 01 mark each.
3. Section B has 07 Very Short Answer type questions carrying 02 marks each.
4. Section C has 05 Short Answer type questions carrying 03 marks each.
5. Section D has 03 Long Answer type questions carrying 05 marks each.
6. Section E has 02 questions carrying 04 marks each.

Section - A
1. What will the following expression be evaluated to in python?
2**2**2
a) 16 b) 128 c) 64 d) 8

2. The three greater than signs(>>>) are called the python__________


a) Cursor b) Prompt c) Pointer d) Blinking cursor

3. Which of the following is an invalid statement?


a) a=b=c=2 b) a, b, c= 10, 20, 30
c) a b c = 20, 30, 40 d) a_b_c = 20

4. How many times is the word “Python” printed in the following statement?
s=’I love python’
for ch in s[3 : 8]:
print(‘python’)

5. Ram wanted to make a program which takes in two numbers from the user and print the two number
as shown below:
Input: Enter number 1=> 23
Enter number 2=> 24
Output: 23.0 24.0
He wrote the following code but doesn’t know what the last line is supposed to be
a = float (input (‘Enter number 1=>’))
b = float (input (‘Enter number 2 =>’))
________________________________
What would be the last line of his code which produces his desired output?
a) print(a+b)
b) print(a, b)
c) print(‘a’, ‘, ‘, ‘b’)
d) print(a, b, sep= ‘, ‘)

6. 1 PB = _____GB

7. Consider the given expression:


True or False and True and not True
What will be the correct output when the given expression is evaluated
a) False b) None c) True d) Null

8. The binary equivalent of (65)10 is (____________)2

9. What will be the output of the following code:


s=”Python”
print (s[:: -1])

10. What will be the output of the following python program?


for x in range(1, 20, 3):
print(x)
Std. 11 -2- COMPUTER SCIENCE

11. Which of the following is not a valid string operation?


a) Slicing b) Concatenation c) Repetition d) Floor

12. What is the full form of ISCII?

13. Which number system uses numbers and letters as symbols?

14. What is the decimal equivalent of (10010)2?

15. Identify the given logical gate.

a) XOR b) NAND c) AND d) OR

16. Which of the following is not a python legal string operation?


a) ‘abc’ + ‘abc’ b) ‘abc’ * 3
c) ‘abc’ + 3 d) ‘abc’. lower( )

The following questions 17 and 18 are Assertion – Reasoning based, answer the
questions by choosing one of the following response:
a) Both A and R are true and R is the correct explanation of A
b) Both A and R are true but R is not the correct explanation of A
c) A is true but R is false
d) A is false but R is true

17. Assertion (A): Slicing a string involves extracting substring(s) from a given string
Reasoning(R): Slicing does not require start and end index value of the string

18. Assertion (A): print(‘INDIA’. capitalize( ))


This command on execution shall display the output as India

Reasoning(R): The capitalize( ) method returns a string where the first character is upper
case, and the rest is lower case.
Section - B
19. Convert (38.625)10 into its binary equivalent
OR
Convert (6C.34)16 into its decimal equivalent

20. The following is a message encoded in ASCII code. What is the message?
100100010001011001010000

21. Convert (EF.B1)16 =( )2


OR
Convert (10.75)8 =( )10

22. Draw a circuit diagram corresponding to the following Boolean expression


z=(u’+v). (v’+w)

23. Verify the following using truth table


X+Y.Z=(X+Y).(X+Z)
OR
X.(Y+Z) = X.Y+X.Z
Std. 11 -3- COMPUTER SCIENCE

24. Write the output of the following code:


x=2
y=3
for i in range (y*2-x):
print(i, end= ‘ ‘)

25. Find error(s) in the following code (if any) and correct it by rewriting code (if any) and
underline the corrections.
x= int(input(“ enter value for x:”))
for in range ( 0, 11):
if x=y:
print x+y
else:
Print x-y

Section-C

26. Convert the following for loop into while loop:


for k in range(10, 20, 5):
print(k)

27. Write a program to find and print the grade of a student when the user inputs their percentage
(Using if elif else)
Percentage of Marks Grade
Above 90% A
80% to 90% B
70% to 80% C
60% to 70% D
Below 60% E

28. Write a program to print the following pattern using nested loop
5
4 5
3 4 5
2 3 4 5
1 2 3 4 5

29. Write a program to print the following pattern using nested loop
A
B C
D E F
G H I J
K L M N O
Std. 11 -4- COMPUTER SCIENCE

30. What will be the ouput of the following programming code?


x=”Amazing”
print(x[3:], “and”, x[:2])
print(x[-7:], “and”, x[-4:-2])
print(x[2:7], “and”, x[-4: -1])
OR
What will be the output of the following programming code?
mySubject=”Computer Science”
print(mySubject[0:len(mySubject)])
print(mySubject[::-2])
print(2*mySubject)
print(mySubject [-7: -1])
print(mySubject[::2])
print(mySubject[len(mySubject)-1])
Section – D
31. An electricity board charges according to following rates :
For first 100 units - 40 P per unit
For the next 200 units - 50 P per unit
Beyond 300 units - 60 P per unit
All users are charged meter charges also which is Rs. 50/-
Write a program to read the code from the user and number of units consumed, and print out
the charges with code in a presentable way.
(Using if elif else)
32. Write a program to input a number till the user desires. Calculate and display: -
 Count of positive numbers
 Sum of positive numbers
 Count of negative numbers
 Sum of negative numbers
 Count of zeros entered
(Using while loop)
33. Write a program to input a string and count and print the following:
i) vowels
ii) digits
iii) special symbols
iv) spaces
v) words
Section – E
34. Write two points of difference between the following:
a) Positive Indexing and Negative Indexing
b) + operator in numeric data type and + operator in string data type.

35. Verify Demorgan’s laws (1st and 2nd) using truth table.

-x-x-x-x-x-x-x-x-

You might also like