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

Attempt All The Questions Very Carefully and Write All The Outputs

The document is the half-yearly examination question paper for Class 11 Computer Science with Python. It contains 20 multiple-part questions testing a variety of Python concepts like data types, operators, functions, loops, lists, strings and more. Students are asked to write code to perform tasks like conversions between number systems, working with tables, defining and calling functions, string indexing and methods, sorting lists, and more. They are also asked conceptual questions about keywords, operators, and programming basics.

Uploaded by

Taru Goel
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Attempt All The Questions Very Carefully and Write All The Outputs

The document is the half-yearly examination question paper for Class 11 Computer Science with Python. It contains 20 multiple-part questions testing a variety of Python concepts like data types, operators, functions, loops, lists, strings and more. Students are asked to write code to perform tasks like conversions between number systems, working with tables, defining and calling functions, string indexing and methods, sorting lists, and more. They are also asked conceptual questions about keywords, operators, and programming basics.

Uploaded by

Taru Goel
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

HALF YEARLY EXAMINATIONS [2019-20]

CLASS – 11TH
SUBJECT – COMPUTER SCIENCE WITH PYTHON
SUBJECT CODE – 083 (NEW)
TIME: 2 Hrs. MM: 70 Marks

Attempt all the questions very carefully and write all the outputs.
1) Conversions – [5 marks]
i) Convert decimal 44 into binary.
ii) Convert decimal 132 into octal.
iii) Convert decimal 206 into hexadecimal.
iv) Convert binary 101010 into decimal.
v) Convert octal 75 into decimal.
2) Consider a table and answer the questions given below – [2.5 marks]
NAME: STUDENTINFO
SR.NO NAME AGE FATHERS NAME ADDRESS MARKS FEES
.
1 AMAR SEN 17 MR RAVI SEN MG ROAD 90 2000
2 ANUJ JAIN 18 MR AMAN JAIN BR ROAD 56 1000
3 SEEMA SON 19 MR SEN SON VIR COLONY 67 1500
4 TIA SINGH 20 MR. RAM SINGH SAMR GATE 87 3000
5 SOM MALIK 15 ARMAAN MALIK RV CHOWK 98 7600

i) Write any attribute.


ii) Name of the relation.
iii) Cardinality of relation.
iv) Degree of relation.
v) Name the primary key.
3) i) What is foreign key? [0.5 mark]
ii) Show union of two tables. [1 mark]
iii) Show Cartesian of two tables. [1 mark]
4) Write a function with argument to convert the entered number of minutes into
hours and remaining minutes. [2.5 marks]
For example - Enter months – 200
There are 3hrs. & 20mins.
5) If x = “python”.Write the code to print – [1.5 marks]
a) Its identity. b) Its type c) Its value.
6) X=5.5+4.5j.Write code to print its real and imaginary part[1 mark].
7) Write the answer as required – [3.5 marks].
I. To find ASCII value IV. What are keywords?
II. To get character encoded by V. Write any one punctuator.
ASCII code numbers. VI. Print this -11 12 13.
III. Write literals in expression- VII. In +a, sign + is unary or binary.
Num=45
8) Write the output- [6 marks]
a) 9**2 g) 20%5
b) “hello”*3 h) Print(print(“double”))
c) “aa”<”ab” i) Print(float(input(“value: - ”)))
d) 20!=20 j) 24<<2
e) 10<25 and 30>40 k) 25>>2
f) 10<25 or 30>40 l) 30^28
9) WAP to print the Fibonacci series up to 8 loops. [3 marks]
10)Find output – [1.5*2=3 marks]

i) for j in range(0,10,2): ii) i=3


for i in range (2): while i<=5:
print(i*j,end=”“) print(i)
print()

11)WAP to print the spelling of the digit between 0-9. [3 marks]


12)Read the code carefully – [1.5*2=3 marks]
i=5
while i>=1:
print(i)
If i==3:
break
i=i-1
i) What is the output of the code?
ii) What is the output, if we replace break with continue?
13)WAP to print the series –
i. 1,2,4,7,11,16. [1.5 marks]
ii. Sum=1+ (1+2) + (1+2+3) +……... (1+2+3….n) [3 marks]
iii. * [1.5 marks]
**
***
****
14)Write reason why these variable names are invalid- [2.5 marks].
4cast, sur name,D.O.B,mid@name,and.
15)Consider a string. A=”SAVE MONEY”.[4 marks]
a) Write the output of the following instructions.
i)A[3:] ii)A[:3] iii)A[:-2] iv)A[-2:] v)A[::2]
b) Replace “save” with “spend”.
c) Lower each letter of the string.
d) Find the 2nd occurrence of “e”.
16)WAP that reads a given line, then counts words and displays how many words are
there in the line. [2 marks].
17)Input the string “institution”. Write a script to partition string at the occurrence of
letter “i”. [2 marks].
18)WAP to sort the given list of numbers with bubble sort. Also write all the steps to
sort in your answer sheet. L= [99, 86, 40, 66, 72, 10] [5 marks].
19)Consider a list L= [55, 34, 23, 89, 55, 50, 111, and 55][10 marks].Write the syntax as
on python shell to perform the following operations –
i) Replicate the list two times.
ii) Add element 30 to the list.
iii) Insert element 48 on 4th position in the list.
iv) Find the index of the element 111 in the list.
v) Remove the 4th element from the list.
vi) Pop off the element 34.
vii) Count the occurrence of element 55.
viii) Search the element 50 in the list.
ix) Find the maximum element in the list.
x) Delete 2nd and 3rd element from the list.
20)Write the output of the following code – [2 marks]
L=[]
L1=[]
L2=[]
for i in range (6,10):
L.append(i)
for i in range (10,4,-2):
L1.append(i)
for i in range (len(L1)):
L2.append(L[i]+L1[i])
L2.append(len(L)-len(L1))
print(L2)

You might also like