XI CS Set 1
XI CS Set 1
XI CS Set 1
Maximum Marks: 70
Time Allowed: 3 hours
General Instructions:
4. Section B has 7 Very Short Answer type questions carrying 2 marks each.
3 1
(i) Convert (8AC)16 to Binary.
6 State True/False 1
(i) OR gate produces 1 as output only when all the inputs
are 1.
(ii) XOR gate produces 0 as output when all inputs are 1
Price = 455.75
18 A.Python has its own rules that determine its syntax. The 1
interpreter interprets the statements if it is correct as per
the rules of Python.
R. This is called Runtime Error
SECTION-B
Or
Or
Or
SECTION-C
27 The formula E = mc2 states that the energy (E) can be 1+1+
calculated as the mass (m) multiplied by the speed of light 1
(c =
3×108 m/s) squared. Write a program to
i. Input the mass of an object in kg.
ii c(speed of light) as constant.
iii find the energy.
Or
The formula F = ma states that the force(F) can be
calculated as the mass (m) multiplied by the
acceleration(a). Write a program to:
i. Input the mass of an object in kg.
ii a(acceleration of object.
iii find the force.
SECTION-D
Or
Or
(a)print(mySubject[0:len(mySubject)])
(b) print(mySubject[-7:-1])
(c) print(mySubject[::2])
(d) print(mySubject.endswith('ion’))
(e) print(mySubject.replace('o','*'))
SECTION - E
34 (i) The following source taken from NCERT Book Computer 1+1+
Science Page 245. Based on the source answer the question 2
below:
get(k, x )
There are two arguments (k, x) passed in ‘get( )’ method.
The first argument is the key value, while the second
argument is the corresponding value. If a dictionary has a
given key (k), which is equal to given value (x), it returns
the corresponding value (x) of given key (k). However, if
the dictionary has no key-value pair for a given key (k), this
method returns the default values the same as the given
key value. The second argument is optional. If omitted and
the dictionary has no key equal to the given key value, then
it returns None.
Syntax:
D.get (k, x) #D dictionary, k key and x value
>>>
D={'sun':'Sunday','mon':'Monday','tue':'Tuesday','wed':'We
dnesday','thu':'Thursday','fri':'Friday','sat':'Saturday'}
(a) D.get(‘thu’,’friday’) (b) D.get(‘wdd’)
(ii) The following source taken from NCERT Book Computer
Science Page 220. Based on the source what will be the
final value of X:
List as arguments
When a list is passed to the function, the function gets a
reference to the list. So if the function makes any changes
in the list, they will be reflected back in the list.
Or
Fill the blank so that code should print the following pattern
123
12
1
i=___ #1
while i>=__: #2
j=1
while j<i :
_________ #3
j=j+1
print()
_____ #4
35 (i) Consider a tuple T = (‘Q’, ’W’, ‘E’, ‘R’, ‘T’, ‘Y’). Identify 1+1+
the statement that will result in an error. 2
a. print(T[2])
b. T[2] = ‘U’
c. print(min(T))
d. print(len(T))
a=int(input(“Enter base”))
b=int(input(“Enter power”))
s=1
for i in range(b):
s*= a
print(s)