Professional Documents
Culture Documents
Resource 20230216201018 G11 Computer Sci. (Exam Capsule)
Resource 20230216201018 G11 Computer Sci. (Exam Capsule)
Resource 20230216201018 G11 Computer Sci. (Exam Capsule)
GENERAL INSTRUCTIONS:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 7Very 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 03 Long Answer type questions, carrying 05 marks each.
7. Section E has 02 questions, carrying 04 marks each.
list1=[8,0,9,5]
print(list1[::-1])
A. [5,9,0,8]
B. [8,0,9]
C. [8,0,9,5]
D. [0,9,5]
3. The marks of a student on 6 subjects are stored in a list, list1=[80,66,94,87,99,95]. How can the
student's average mark be calculated? 1
A. print(avg(list1))
B. print(sum(list1)/len(list1))
C. print(sum(list1)/sizeof(list1))
D. print(total(list1)/len(list1))
4. What will be the output of above Python code? 1
str1="6/4"
print("str1")
A. 1
B. 6/4
C. 1.5
D. str1
5. Which of the following is False? 1
A. String is immutable.
B. capitalize() function in string is used to return a string by converting the whole given string into
uppercase.
C. lower() function in string is used to return a string by converting the whole given string into
lowercase.
D. String is mutable.
6. What will be the output of below Python code? 1
str1="poWer"
str1.upper()
print(str1)
A. POWER
B. Power
C. power
D. poWer
7. Choose the correct option with respect to Python. 1
A. Both tuples and lists are immutable.
B. Tuples are immutable while lists are mutable.
C. Both tuples and lists are mutable.
D. Tuples are mutable while lists are immutable.
8. What will be the output of below Python code? 1
tuple1=(5,1,7,6,2)
tuple1.pop(2)
print(tuple1)
A. (5,1,6,2)
B. (5,1,7,6)
C. (5,1,7,6,2)
D. Error
9. Which of the following options will not result in an error when performed on tuples in Python where
tupl=(5,2,7,0,3)? 1
A. tupl[1]=2
B. tupl.append(2)
C. tupl1=tupl+tupl
D. tupl.sort()
10. Which of the following statements create a dictionary? 1
a) d = {}
b) d = {“john”:40, “peter”:45}
c) d = {40:”john”, 45:”peter”}
d) All of the mentioned
11. What will be the output of the following Python code snippet? 1
1. d = {"john":40, "peter":45}
a=3+5/8
b= int (3+5/8)
c=3+float (5/8)
d=3+float (5)/8
print (a, b, c, d)
24. Convert the following: 2
a) A6 to decimal
a) (x+y).(x’+z’).(y+z)
27. Find the errors in the following code and rewrite correct code.
Num=int(input ”enter number 1”) 3
If Num>2
Print(Num+1)
Else
Print(Num+3)
29. State DeMorgan’s first Law of Boolean Algebra and verify it using truth
table. 3
30. Write a program to check if all the elements of a tuple are in descending order or not. 3
32. What do you mean by python list ? explain how to create a access lists in python. 5
33. Write a program to read two numbers and an arithmetic operator and displays the computed result. 5