You are on page 1of 5

Class 12 Computer Science MCQs Python Revision

Tour Set – 2
mycstutorial.in/class-12-computer-science-mcq-python-revision-tour-set-2

August 9, 2021

Python Revision Tour Set 2


21. Is Python case sensitive when dealing with identifiers?

a) Yes

b) No

c) Machine dependent

d) None of these

Answer : a) Yes

22. Which of the following is an invalid variable?

a) name_of_student

b) 2_name_of_student

c) student_name_2

d) None of these

Answer : b) 2_name_of_student

23. Which of the following is not a keyboar?

a) eval

b) nonlocal

c) pass

d) assert

Answer : a) eval

24. Which of the following cannot be a variable?

a) in

b) it

1/5
c) __init__

d) on

Answer : a) in

25. Which of these is not a a core data type?

a) class

b) list

c) dictionary

d) tuple

Answer : a) class

26. How do you write pt in Python as an expression?

a) p$t

b) p**t

c) p^t

d) p*t

Answer : b) p**t

27. How you will write the formula of compound interest in Python?

a) p * 1 + r/100 ** t

b) p * 1 + r/100 ** t – p

c) p * (1 + r/100)**t – p

d) None of these

Answer : c) p * 1 + r/100 ** t – p

28. Which of the following is an invalid statement in Python?

a) a=10,500

b) a,b = 10,500

c) a = b = 10

d) a b = 10 500

2/5
Answer : d) a b = 10 500

29. Which value type does print() return?

a) String

b) Integer

c) Boolean

d) None

Answer : d) None

30. Which value type does input() return?

a) String

b) Integer

c) Boolean

d) None

Answer : a) String

31. Which of the following is not a valid keyword?

a) yield

b) lambda

c) final

d) finally

Answer : c) final

32. Which of the following is not a valid keyword?

a) else

b) delete

c) global

d) from

Answer : b) delete

33. In Python, String can be written in ______ ways?

3/5
a) 1

b) 2

c) 3

d) 4

Answer : b) 2

34. In Python, String can be ___________.

a) Single line strings

b) Multi-line strings

c) Both (a) and (b)

d) None

Answer : c) Both (a) and (b)

35. In Python, String (i.e. sequence of characters) can be surrounded by


___________.

a) Single quote ‘ ‘

b) Double quote ” “

c) Triple quote ”’ ”’ or “”” “””

d) All of these

Answer : d) All of these

36. Which of the following is a valid multi line string?

a) name = “mycs \

tutorial.in”

b) name =””” mycs

tutorial.in”””

c) name = ”’ mycs

tutorial.in”’

d) All of these

Answer : d) All of these

4/5
5/5

You might also like