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

Annual Examination class xi

yes bro its that

Uploaded by

qwerty3027
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)
36 views

Annual Examination class xi

yes bro its that

Uploaded by

qwerty3027
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/ 7

Annual Examination

Class XI
Subject : Computer Science

Time : 3hrs MM: 70

Instructions
1.This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 20 questions carrying 01 mark each.
4. Section B has 04 Very Short Answer type questions carrying 02 marks each.One internal choice is
given in this section
5. Section C has 04Short Answer type questions carrying 03 marks each.
6. Section D has 05 Long Answer type questions carrying 04 marks each.
7. Section E has 02 questions carrying 05 marks each.
7. All programming questions are to be answered using Python Language only.

SECTION A
Q1 State True or False 1
“Tuple is datatype in Python which contain data in key-value pair.”

Q2 Given the following dictionaries 1


dict_student = {"rno" : "53", "name" : ‘Rajveer Singh’}
dict_marks = {"Accts" : 87, "English" : 65}
Which statement will merge the contents of both dictionaries?
(A) dict_student + dict_marks (B) dict_student.add(dict_marks)
(C) dict_student.merge(dict_marks) (D) dict_student.update(dict_marks)

Q3 Which of the following is not a valid python operator? 1


a) % b) in c) # d) **

Q4 What will be the output of the following string operation. 1


str="PYTHON@LANGUAGE"
print(str[2:12:2])
a) ‘PTO@AG’ b) 'TO@AG' c) ‘TO@NU’ d) ‘YHNLN’

Q5What will be the data type of d if d=(15) 1


a)int b)tuple c)list d)String

Q6 What will the following expression be evaluated to in Python 1


>>>25//4+3**1**2*2
a)24 b)18 c)6 d)12

Q7 Select the correct output of the code: 1


for i in "QUITE":
print([i.lower()], end= "#")
(a) q#u#i#t#e#
(b) [‘quite#’]
(c) ['q']#['u']#['i']#['t']#['e']#
(d) [‘quite’] #
Q8 What will be the Output for the following code – 1
Language=["C", "C++", "JAVA", "Python", "VB", "BASIC", "FORTRAN"]
del Language[4]
Language.remove("JAVA")
Language.pop(3)
print(Language)

(a) ['C', 'C++', 'VB', 'FORTRAN']


(b) ['C', 'C++', 'Python', 'FORTRAN']
(c) ['C', 'C++', 'BASIC', 'FORTRAN']
d) ['C', 'C++', 'Python', 'BASIC']

Q9 A word used in high level language , Which has special meaning for the system
Interpreter is called the 1
a)Literal b)Identifier c)Keyword d)None of these

Q10 The function which converts string str into sentence case is 1
a)str.capital() b)str.capitalize() c)str.title() d)None of these

Q11 Which of the following is not a Cyber Crime 1


a) Phishing b)Hacking c) FireWall d)Eavesdropping

Q12 After a fight with your friend, you did the following activities. Which of these activities is
not an example of cyber bullying? 1
a) You sent an email to your friend with a message saying that “I am sorry”.
b) You sent a threatening message to your friend saying “Do not try to call or talk to me”.
c) You created an embarrassing picture of your friend and uploaded on your account on a social
networking site.

Q13 Name the Python Library needed to be imported to invoke the following functions:
a.sqrt() b median() 1

Q14 Consider two tuples given below 1


Tup1=(1,2,4,3)
Tup2=(1,2,3,4)
What will the following statement print(Tup1<Tup2)
i)True ii)False iii)Error iv)None of these

Q15 What will be the Output: 1


>>> p1={"Rahul":56,"Virat":99}
>>> 99 in p1
i) True ii) False iii) No output Iv)Error

Q16 Which output lines of the following program will print the same results? 1
tup1 = (10, 20, 30, 40, 50, 60, 70, 80, 90)
print(tup1[5:-1]) # 1
print(tup1[5]) # 2
print(tup1[5:]) # 3
print(tup1[-4:8]) # 4
a. (1) and (2)
b. (1) and (4)
c. (2) and (3)
d. (1), (3) and (4)

Q17 . Which of these statements about for and while loops in Python is TRUE? 1
a. A for loop usually run a given number of times; a while loop runs while a condition is met.
b. Statements in a for loop are always run at least once; those in a while loop may never be run.
c. A for loop cannot contain another for loop; a while loop can contain another while loop.
d. A for loop always has to have a loop counter; a while loop never uses a loop counter.

Q18 Which of these Python data structures cannot have duplicate items and does not support
ordering? 1
a. list b. tuple c. dictionary d. set

Q19 1

Q20 Assertion (A): According to research conducted by Symantec, nearly 8 out of 10 individuals are
subject to the different types of cyber bullying in India.
Reason (R) : Don’t give or post any personal information like your name, address of the school/office
home, phone numbers, age, sex, credit card details etc.,
Choose the correct answer:
a) Both A and R are true and R is correct explanation of A
b) Both A and R are true and R is not correct explanation of A
c) A is true but R is false.
d) A is false but R is True
Section B
All questions carry 2 marks each (Attempt any 4)
Q21Predict the output of the Python code given below:
data=["L",20,"M",40,"N",60]
times=0
alpha=""
add=0
for c in range(1,6,2):
times = times + c
alpha = alpha + data [c-1]+ “ @”
add = add + data[c]
print (times, add, alpha)

Q22 Rewrite the following code in python after removing all the syntax errors.
Underline each correction done in the code.
num1, num2 = 10
While num1 % num2 = 0
num1+= 20
num2+= 30
Else:
print(‘hello’)

Q23Rewrite the code using the “for” loop


n=1
a=1
while n<=5:
print(a*a-1)
a=a+1
n=n+2

Q24 Explain the membership operators with example .

Q25 Match the following :

Section C
All questions carry 3 marks each
Q26 What Precautions will you take to protect your data while accessing the internet?
Q27What are the purpose of the following functions (with example)
a) fromkeys() of dictionary
b) index() of tuple
c) split() of string
Q28 Differentiate between Relational operators & Logical operators with Example
Q29 You got the below shown SMS from your bank querying a recent transaction. Answer the
following:

a) Will you SMS your pin number to the given contact number?
b) Will you call the bank helpline number to recheck the validity of the SMS received?

Section D
All questions carry 4 marks each
Q30 In an examination ,the grades are awarded to the students in”Science” According to
the average marks obtained in the examination 4
Marks grades
80% above distinction
60% above and less then 80% First Division
45 % above and less then 60% Second Division
40% above but less then 45% Pass
Less then 40% Grade not awarded
Accept the name of student with marks in science and display the grades allotted as per the
above criteria
Or
Write a python program to accept the value of x and n and calculate the sum of the series :
S= 1+x2/3 +x3/5 +x4/7 + x5/9+……………..+n terms
Q31 Differentiate between Give appropriate example
a. ceil() & floor() function of math module 2
b. pop() & popitem() function of dictionary 2
Q32 Write a Python Program to input n names and phone numbers to store it in a dictionary
& print the phone number of a particular name searched in dictionary display appropriate
msg if not found 4
Q33Write a program that reads a line , then counts how many times the word “is” appears
in the line and display the count. 4
Q34 Write a program that accept the list of strings from the user and display all the strings
that starts with vowel 4

Section E
All questions carry 5 marks each
Q35 Neeti has partially developed the code given below to create a dictionary comprising month
name with number of days in python.Help her in completing the program :
Days={“January”:31,”February”:28,”March”:31,”April”:30,”may”:31,”June”:30,”july”:31\
,“August”:31,”September”:30,”October”:30,”Nov”:30,”December”:31}
# display months having 31 days
for key ,value in ________________:#(a)
if ______________________:#(b)
print(Key)
# display Months and Days starting with “A” or “M”
for key in Days.keys():
if ________________________:#(c)
print(_____________)#(d)
#change number of days in February as 29
________________________#(e)
a)Write the function to get both keys and values.
b)Write a condition to check if the number of days is 31
c)Write a condition to check month should start with “A” or “M”
d)Display Month and Days
e) Change number of days as 29 for the month of February.
Q36 Based on the following code answer the questions
import ___________________ #1
AR=[20,30,40,50,60,70]
FROM=random.randint(1,3)
TO=random.randint(2,4)
for K in range(FROM,TO+1):
print (AR[K],end=”#“)
i)What module should be imported To execute the above code #1?
(A) math (B) random (C) pickle (D) csv
ii)What will Be the maximum value of the variables FROM and TO?
A. 3,4 B. 4,3 C. 2,4 D. 4,2
iii) What will Be the minimum value of the variables FROM and TO?
A. 2,1 B. 1,2 C. 1,3 D. 1, 4
iv) What possible outputs(s) are expected to be displayed on screen at the time of execution of the
program?
A. 10#40#70# B. 30#40#50#
C. 50#60#70# D. 40#50#70#
v) Differentiate between randint() and randrange()

You might also like