0% found this document useful (0 votes)
65 views12 pages

Sanjukta Maam 2

Uploaded by

johhnysins1978
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views12 pages

Sanjukta Maam 2

Uploaded by

johhnysins1978
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

(MCQ For CBSE CLASS XI & XII)

(Part-2)

MULTIPLE CHOICE TYPE OF


QUESTIONS
FOR
EXAMINATION

1.Python Fundamentals
2.Data Handling
Prepared By :

Sanjukta Maam
(Computer Science)
1. Consider a declaration T = [1, 'Python', '3.14']. Which of the following represents the
data type of T?

a) list c) dictionary
b) tuple d) string

2. Given a Tuple tup1= (5,10,15,20,25,30,35,40,45,50).

What will be the output of print (tup1 [2:7])?

a) (20,25,30,35,40) c) (10,15,20,25,30,35)

b) (15,20,25,30,35) d) (20,25,30,35)

3. The return type of the input() function is

a) string c) list
b) integer d) tuple

4. Which of the following stores a single element in a tuple?

a) T=(5,) c) T=[5]
b) T=(5) d) T={5}
5. Which of the following symbol returns the output in integer form?

a) / c) //
b) /* d) #

6. What is the output of following code?


T=(10)
print(T**2)

a) Syntax error c) 100


b) (10,10,) d) (100,100)

7. Evaluate the following expression and identify the correct answer.


X=int(13.25+4/2)

a) 17 c) 15
b) 14 d) 23

8. Which one of the following is not a keyword:

a) if b) for
c) While d) else
9. suppose t = (1, 2, 4, 3), which of the following is incorrect?
a) print(t[3]) b) t[3] = 45
c) print(max(t)) d) print(len(t))

10. If x="Computer Book", then lent(x) will give ?

a) 12 b) 14
c) 13 d) None of these
11. Select correct Boolean literal : -

a) true b) TRUE
c) false d)True

12. What will be the output of the following code?


tup1 = (2,5,7,9,5,6,3,8,2)
print(tup1[1:7:2])

a) (5,9,6) c) (5,9,3)

b) (7,5,3) d) Error Message


13. What is the answer to this expression, 22 % 3 is?

a) 7 b) 0
c) 1 d) 5

14. Which of the following statements assigns the value 56 to the variable x in Python:

a) x ← 56 b) x = 56
c) x := 56 d) int x = 56

15. l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?

a) List b) Tuple
c) String d) None of these

16. How can we create an empty list in python?

a) list=() b) null
c) list d) list=[]
17. If x=3.123, then int(x) will give ?
a) 28 b)
a) 1 b) 0 c) 829 d)
c) 1 d) 3

18. Correct way to declare a variable x of float data type in


python:

a) x = 2.5 b) float
x = 2.5
c) float(2.5) d) All of
the above

19.Which line of code produces an error?

a) “PythonMcq” + “12” b)
‘PythonMcq’ + 16
c) 3+7
d) ‘PythonMcq’ + “21”

20. What is the value of the expression 10+3**3*2?


Thank You
Students !!

Watch next
From
Sanjukta Maam
17. Which of the following can be used to delete item(s) from a dictionary?

A. del statement
B. get()
C. getitem()
D. all of these

18. Evaluate the following expression if A=14 and B=15 then find the value of (A % B // A )

A. 0.0
B. 0
C. 1.0
D. 1

19. Evaluate the following expression and identify the correct answer.

16 - (4 + 2) * 5 + 2**3 * 4
A. 54
B. 46
C. 18
D. 32

20. Which of the following is correctly evaluated for this function?


pow(x,y,z)
A. (x**y) / z
B. (x / y) * z
C. (x**y) % z
D. (x / y) / z
1.26.
27. Which one of the following has the same precedence level?
A. Division, Power, Multiplication, Addition and Subtraction
B. Division and Multiplication
C. Subtraction and Division
D. Power and Division

28.
29.
30.
Waste
1. A loop becomes infinite loop if a condition never becomes ________.
A. TRUE
B. FALSE
C. Null
D. Both A and C
2. A loop becomes infinite loop if a condition never becomes ________.
A. TRUE
B. FALSE
C. Null
D. Both A and C
3. What will be the output of the following code segment?
L='good'
L=[1,2,3]
n=2
print(L*n)
A. goodgood
B. [1, 2, 3, 1, 2, 3]
C. Error
D. None
4. . A variable defined inside function body is known as :
A. global
B. local
C. outer
D. inside
5. . _______ object is used to read data from csv file?
A. load ( )
B. read( )
C. reader( )
D. readlines( )
6. The record of a student (Name, Roll No, Marks in five subjects and percentage of marks) is stored in the following list:
stRecord = ['Raman','A-36',[56,98,99,72,69], 78.8]
Write Python statements to retrieve 69 the from the list stRecord.
A. print(stRecord [2][4])
B. print(stRecord [2][-1])
C. print(stRecord [-2][1])
7. Choose odd one out : -
A. except
B. with
C. Import
D. else
8. Which of the following is not a function of tuple?
A. update( )
B. index( )
C. len( )
D. count( )
What is the delimiter in following csv file':
f=open(‘abc.csv’,delimiter=’\n’):
A. Tab space
B. Comma
C. New Line Character
D. Blank Space
14. Write the output of the following:[U]
a=(1, 2, 3, 2, 3, 4, 5)
print(min(a) + max(a) + a.count(2))
A. 13
B. 6
C. 8
D. Error
What will be the output of the following python code:
val = 100
def display(N):
global val
val = 50
if N%14==0:
val = val + N
else:
val = val - N
print(val, end="@")
display(40)
print(val)
a) 100@10
b) 50@5
c) 5@50
d) 100@10@
Which of the following statement will return an error? T1 is a tuple.
A. T1 + (23)
B. T1 + [3]
C. Both of the above
D. None of the above
Based on the below code, What maximum value can be assigned to TO and minimum value can be assigned to FROM.
Import random AR = [20, 30,40,50, 60, 70]
FROM = random.randrange(1,3)
TO = random.randrange(2,4)
for K in range(FROM, TO+1):
print(AR, end=’#’)
a) 3,1
b) 4,1
c) 3,2
d) 4,2

You might also like