Dav Computer Science SP
Dav Computer Science SP
General Instructions:
1. This question paper contains five sections, Sections A to E.
2. All questions of a particular section must be attempted in the correct order.
3. SECTION A has 18 Objective Type Questions of 01 mark each.
4. SECTION B has 07 Very Short Answer Type Questions carrying 02 marks each.
5. SECTION C has 05 Short Answer Type Questions carrying 03 marks each.
6. SECTION D has 02 Questions carrying 04 marks each.
7. SECTION E has 03 Questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only
SECTION - A
1. Which of the following is a valid identifier in Python? 1
a. none b. True c. False d. None
2. Size of ASCII Code is: 1
a. 8 bit b. 7 bit c. 128 bit d. 256 bit
3. The _____ mode of Python gives instant result of typed statement. 1
a. Interactive b. script c. both a and b d. none of these
4. 1 GB is equal to - 1
a. 210 MB b. 220 KB c. both a and b d. None of the above.
5. Identify the following Boolean logic gate. 1
20. What can be done to reduce the risk of identity theft? Write any two ways. 2
OR
Column A Column B
a. for i. Punctuator
b. + ii. literal
c. : iii. Operator
d. 5 iv. Keyword
22. Rewrite the following code in Python after removing all syntax error(s). Underline 2
each correction done in the code.
25=Val
for I in range(0,Val)
if I%2=0:
print( I+1)
Else:
print (I-1)
23. Convert the following into its equivalent: 2
i) (10110.11)2 = ( ? )10
ii) (BAD)16 = ( ? )8
24. What possible output(s) are expected to be displayed on screen at the time of 2
execution of the program from the following code? Also specify the maximum values
of variables minn and maxn.
import random
ar=[2,3,4,5,6,7]
minn=random.randint(1,3)
maxn=random.randint(2,4)
for i in range(minn,maxn+1):
print(ar[i],end='#')
a. 3#4#5# b. 5#6#7# c. 1#4#7# d. 4#5#7#
OR
WAP to generate five random integers between 50 and 75 and display the sum of
random numbers generated.
25. Write the Boolean expression for the following logic circuit shown below: 2
28. WAP to create a list L3 from two given lists L1 and L2 such that the elements of 3
L1 are placed at even index and elements of list L2 are placed at odd index of L3.
For example :
if L1= [1,2,3,4,5] and L2 =[7,8,9,10,11]
then L3 should be [1,7,2,8,3,9,4,10,5,11]
29. a. Match the columns 2+1
1. Phishing a. visual symbol, word, name, design, etc
2. Cyber crime b. use of digital technology along with the Internet.
3. Trademark c. fake websites or emails look authentic or Original
4. Digital Society d. computers are used as a tool to commit crime.
30 Write a Python code to input electricity unit charges and calculate total electricity bill 3
according to given condition:
For units between 0-49, charge is Rs 0.50/unit.
For units between 50-99, charge is Rs 0.75/unit.
For units between 100-199, charge is Rs 1.20/unit.
For 200 and above units, charge is Rs 1.50/unit.
An additional surcharge of 20% is added to the bill in each case.
OR
A company decided to give bonus to employee according to following criteria:
Time period of Service Bonus
More than 10 years 10%
>=6 and <=10 8%
Less than 6 years 5%
Ask user for their salary and years of service and print the net bonus amount.
XI –COMPUTER SCIENCE Page 4 of 6
SECTION - D
31. a. How many times the values of i and j will be displayed after executing the 2+2
following python code?
i,j=5,6
while i<20:
i=i+j
j=j-1
print(i,j)
b. Rewrite the following for loop into its equivalent while loop.
for i in "Programming ":
print(i)
32. Assume the list : List=[8,9,10]. Do the following using list functions : 4
a) Insert value 17 at index 1.
b) Add 4, 5 and 6 to the end of the list.
c) Remove the first entry from the list.
d) Sort the list in reverse order.
SECTION - E
33. Question consider the following string
S1='Azadi ka Amrit Mahotsav'
(i) Compare the outputs of statement 1 and statement 2 2+1+
statement 1 : print(S1[-len(S1[3:8]):-len(S1[-3:-1])].upper()) 2
statement 2 : print( S1[- len( S1[3:8].upper()) :- len( S1[-3:-1].upper())])
(ii) Give the output
print( S1.endswith( 'sav') and S1.startswith( 'azadi'))
(iii) Formulate the code to display five letter words in the string S1.
34. a. Create a dictionary named dict_1 and perform the following: 4+1
i. dict_1 should have first five prime numbers as key and their number
names as value
ii. Write statement to return the keys in the dictionary.
iii. To check if 7 is present or not.
iv. To retrieve the value corresponding to 5
b. Differentiate between pop( ) and popitem( ).
OR
OR
Anup asked his friend Deepak to suggest him software for image editing. Deepak
asked Anup whether he wanted to buy the software or use it freely. Anup is not 1+1+
interested in buying. Help Deepak to find a solution for his friend by answering 2+1
the following questions.
a. State the difference between License and Open-Source License.
b. Name two popular categories of Public Licenses.
c. Name a FOSS for i. Image editing software ii. Browser
d. Explain Proprietary Software.
************