Python Basic MCQ for CBSE Class 11
In this section we will learn the python fundamental MCQ for CBSE class 11 Computer Science. This exercise will also help the students of CBSE Computer Science class 12 students who are appearing in Multiple Choice Question based, Term 1 examination in November/ December 2021.
1. What is the maximum possible length of an identifier?
a) 31 characters
b) 63 characters
c) 79 characters
d) none of the mentioned
2. Who developed the Python language?
a) Zim Den
b)Wick van Rossum
c) Guido van Rossum
d) Niene Stom
3. In which year was the Python language developed?
a) 1991
b) 1989
c) 1981
d) 1973
4. Which one of the following is the correct extension of the Python file?
a) .py
b) .python
c) .p
d) None of these
5. Which of the following is an invalid variable?
a) my_string_1
b) 1st_string
c) foo
d) _
6. Which of the following cannot be a variable?
a) __init__
b) in
c) it
d) on
7. Which is the correct operator for power(xy)?
a) X^y
b) X**y
c) X^^y
d) None of the mentioned
8. Which one of these is floor division?
a) /
b) //
c) %
d) None of the mentioned
9. What is the answer to this expression, 22 % 3 is?
a) 7
b) 0
c) 1
d) 5
10. What is the output of this expression, 3*1**3?
a) 27
b) 9
c) 3
d) 1
Chapterwise Question Bank CBSE Class 11 Computer Science (Python)
11. A function in Python begins with which keyword?
a) void
b) return
c) def
d) int
12. What do we use to define a block of code in Python language?
a) Key
b) Brackets
c) Indentation
d) None of these
13. Which character is used in Python to make a single line comment?
a) /
b) //
c) #
d) !
14. Which of the following declarations is incorrect?
a) _x = 2
b) ____x = 3
c) __xyz__ = 5
d) None of these
15. Which of the following words cannot be a variable in python language?
a) _val
b) val
c) try
d) _try_
Python Fundamentals Class 11 MCQs
16. Which of the following option is not a core data type in the python language?
a) Dictionary
b) Lists
c) Class
d) All of the above
17. Which of the following statements assigns the value 25 to the variable x in Python:
a) x ← 25
b) x = 25
c) x := 25
d) int x = 25
18. Which one of the following is the correct way of declaring and initializing a variable, x with the value 7?
a) int x
x=7
b) int x=7
c) x=7
d) declare x=7
19. In which data type, indexing is not valid?
a) List
b)String
c) Dictionary
d) None of the above
20. Select the correct example of complex datatype in Python
a) 3 + 2j
b) -100j
c) 5j
d) All of the above are correct
Also Check: Board Sample Paper for class 12 Computer Science to be held in November/December 2021
21. l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?
a) List
b) Tuple
c) Set
d) None of these
22. How can we create an empty list in python?
a) list=()
b) null
c) list
d) list=[]
23. If x=3.123, then int(x) will give ?
a) 1
b) 0
c) 1
d) 3
24. 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
25. In order to store values in terms of key and value we use that core data type in python?
a) List
b) Class
c) Dictionary
d) Tuple
Python Fundamentals Class 11 MCQs
26. Which statement is true from following-
a) List is mutable & Tuple is immutable
b) List is immutable & Tuple is mutable
c) Both are Mutable.
d) Both are Immutable
27. Identify tuple from the following-
a) [3]
b) {1, 2, 3}
c) (1, 2, 3, 4)
d) None of the Above
28. Special meaning words of Pythons, fixed for specific functionality are called ………. .
a) Identifiers
b) functions
c) Keywords
d) literals
29. Names given to different parts of a Python program are ………. .
a) Identifiers
b) functions
c) Keywords
d) literals
30. Data items having fixed value are called ………. .
a) Identifiers
b) functions
c) Keywords
d) literals
31. Which of the following is/are correct ways of creating strings ?
a) name = Jiya
b) name = ‘Jiya’
c) name = “Jiya”
d) name = (Jiya)
32. Which of the following are keyword(s) ?
a) name
b) Print
c) print
d) input
33. Which of the following are valid identifiers ?
a) my name
b) _myname
c) 2myname
d) my-name
34. Escape sequences are treated as ………. .
a) strings
b) characters
c) integers
d) none of these
35. Which of the following is an escape sequence for a tab character ?
a) \a
b) \t
c) \n
d) \b
36. Which of the following is an escape sequence for a newline character ?
a) \a
b) \t
c) \n
d) \b
37. Which of the following is not a legal integer type value in Python ?
a) Decimal
b) Octal
c) Hexadecimal
d) Roman
38. Which of the following value is not legal in an octal value ?
a) 7
b) 8
c) 11
d) 0
39. Which of the following is/are expression(s) ?
a) a+b-5
b) a
c) -5
d) 0
40. The lines beginning with a certain character, and which are ignored by a compiler and not executed, are called ……….
a) operators
b) operands
c) functions
d) comments
41. Which of the following functions print the output to the console ?
a) Output( )
b) Print( )
c) Echo( )
d) print( )
42. Select the reserved keyword in Python.
a) else
b) import
c) print
d) all of these
43. The input( ) returns the value as ………. type.
a) integer
b) string
c) floating point
d) none of these
44. To convert the read value through input( ) into integer type, ……….( ) is used.
a) floating
b) float
c) int
d) integer
45. To convert the read value through input( ) into a floating point number, ……….( ) is used.
a) floating
b) float
c) int
d) integer
46. To print a line a text without ending it with a newline, ………. argument is used with print( )
a) sep
b) newline
c) end
d) next
47. The default separator character of print( ) is ……….
a) tab
b) space
c) newline
d) dot
48. Python is____
a) High-Level
b) Interpreted
c) Object-Oriented
d) All Of The Above
49. Which symbol denotes the python prompt?
a) >>>
b) #
c) ”’
d) //
50. Which of the following is a valid string literal?
a) “PythonMcq”
b) ‘PythonMcq’
c) ”’PythonMcq”’
d) All of these
51. Which line of code produces an error?
a) “PythonMcq” + “12”
b) ‘PythonMcq’ + 16
c) 3 + 7
d) ‘PythonMcq’ + “21”
52. How many keywords present in the python programming language?
a) 32
b) 61
c) 33
d) 27
53. Which of the following keywords is not reversed keyword in python?
a) None
b) class
c) goto
d) and
54. More than one value(s) can be returned by a function in Python.
a) True
b) False
55. The variable declared inside a function is called a global variable.
a) True
b) False
Python Fundamentals Class 11 MCQs
56. Once a function is defined, it may be called only once from many different places in a program.
a) True
b) False
57. Value returning functions should be generally called from inside of an expression.
a) True
b) False
58. A local variable having the same name as that of a global variable hides the global variable in its function.
a) True
b) False
59. Python passes parameters by reference.
a) True
b) False
60. Parameters specified within a pair of parentheses in the function definition are the actual parameters or non-formal parameters.
a) True
b) False
61. A function in Python is used by invoking it via a function call.
a) True
b) False
62. Functions that do not return any value are known as
a) fruitful functions
b) void functions
c) library functions
d) user-defined functions
63. A variable created or defined within a function body is classified as-
a) local
b) global
c) instance
d) build-in
64. Name the statement that sends back a value from a function.
a) print
b) return
c) input
d) none
65. Which values are used by the functions to communicate information back to the caller?
a) local
b) global
c) random
d) return
Comments are closed.