You are on page 1of 6

Class 12 Computer Science MCQs Python Revision

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

August 9, 2021

Python Revision Tour Set 1


1. Who is the founder (designed by) of Python?

a) Charles Babbage

b) Guido Van Rossum

c) Guido Gosling

d) James Gosling

Answer : (b) Guido Van Rossum

2. Python development is started in which year?


a) 1990

b) 1991

c) 1992

d) 1989

Answer : (d) 1989

3. Python is released in which year?


a) Feb 1990

b) Feb 1991

c) Feb 1992

d) Feb 1989

Answer : (b) Feb 1991

4. Python is developed in which year?


a) 1990

b) 1991

1/6
c) 1992

d) 1989

Answer : (a) 1990

5. Who is the developer of Python?


a) Free Software Foundation

b) Python Software Foundation

c) Open Source Foundation

d) None of these

Answer : (b) Python Software Foundation

6. Python is a successor of which programming Language?


a) ABC Programming Language

b) C Programming Language

c) Basic Programming Language

d) BPCL Programming Language

Answer : (a) ABC Programming Language

7. Which of the following is not a token?


a) Keywords

b) Literals

c) Looping

d) Operators

Answer : (c) Looping

8. Which of the following is not a token?


a) Selection

b) Punctuators

c) Identifiers

d) Operators

2/6
Answer : (a) Selection

9. Which of the following is a token?


a) Selection

b) Looping

c) Jump Statement

d) Operators

Answer : (d) Operators

9. Which of the following is a valid set of keywords?


a) None, False, True, assert

b) del, is in, raise

c) break, continue, yield, with

d) while, for, if, else if

Answer : (d) while, for, if, else if

Reason : else if is not a valid keyword. elifis a valid keyword in Python.

10. Which of the following is a valid set of keywords?


a) class, and, or, not

b) def, elif, else, except

c) from, global, import, local

d) lambda, pass, return, try

Answer : (c) from, global, import, local

Reason : local is not a valid keyword. nonlocal is a valid keyword in Python.

11. Which of these in not a core data type?


a) Lists

b) Dictionary

c) Tuples

d) Class

3/6
Answer : (d) Class

12. Given a function that does not return any value, What value is thrown
by default when executed in shell.
a) int
b) bool
c) void
d) None

Answer : (d) None

13. Following set of commands are executed in shell, what will be the
output?
str=”hello”
str[:2]

a) he
b) lo
c) olleh
d) hello

Answer : (a) he

14. Which of the following will run without errors?


a) round(45.8)
b) round(6352.898,2,5)
c) round()
d) round(7463.123,2,1)

Answer : (a) round(45.8)

Reason: round(number, round_digit) takes two arguments. Where round_digit is optional. Default
value of round_digit is 0.

15. What is the return type of function id ?


a) int
b) float
c) bool
d) dict

Answer : (a) int

16. Which of the following is an invalid variable?

4/6
a) _Day2

b) Day_2

c) 2_Day

d) Day2_

Answer : (c) 2_Day

Reason: Variable name can not start with digit.

17. Which of the following is an invalid variable?


a) Week Day_2

b) Week_Day_2

c) 2_WeekDay

d) WeekDay2_

Answer : (a) Week Day _2

Reason: Variable name can not contain space.

18. Which of the following is an invalid variable?


a) Week Day_2

b) Week_Day#2

c) 2_WeekDay

d) WeekDay2_

Answer : (b) Week_Day#2

Reason: Variable name can not contain special symbol #. Only _ (underscore) is allowed.

19. Which of the following is an invalid variable?


a) While

b) Break

c) if

d) For

Answer : (c) if

5/6
Reason: Variable name can not be Keyword.

In Python, all keywords are in small letters, except True, False, and None.

20. Which of the following is an invalid variable?


a) Week Day_2

b) Week_Day#2

c) 2_WeekDay

d) WeekDay2_

Answer : (b) Week_Day#2

Reason: Variable name can not contain special symbol #. Only _ (underscore) is allowed.

6/6

You might also like