Python Data Types Interview MCQ Questions and Answers

Study and learn Interview MCQ Questions and Answers on Python Data Types basics. Attend job interviews easily with these Multiple Choice Questions. You can print these Questions in default mode to conduct exams directly. You can download these MCQs in PDF format by Choosing Print Option first and Save as PDF option next using any Web Browser.

Go through Python Theory Notes on Data Types before reading these objective questions.



1) What is data type in Python?
A) The type of a variable
B) The type of data variable is holding
C) Both A and B
D) None
Answer [=]
Answer[=]
2) Python is a dynamically typed programming language. State TRUE or FALSE.
A) TRUE
B) FALSE
C) -
D) -
Answer [=]
Answer[=]
3) Python has Primitive and Non-Primitive data types. State TRUE or FALSE.
A) TRUE
B) FALSE
C) -
D) -
Answer [=]
Answer[=]
4) Choose the correct answer about Python Data type?
A) Data type is resolved at runtime
B) Specifying Data type at compile time is not required
C) The type of a variable is nothing but the type of data being assigned to it.
D) All the above
Answer [=]
Answer[=]
5) Choose the correct answer about Python data types.
A) There is no primitive data type in Python.
B) All variables in python are treated like Objects.
C) There are some built-in data types in Python
D) All the above
Answer [=]
Answer[=]
6) Identify correct Python built in data types below.
A) int
B) float
C) complex
D) All the above.
Answer [=]
Answer[=]
7) Identify correct built-in python data types below.
A) True
B) False
C) Both A and B
D) TRUE and FALSE
Answer [=]
Answer[=]


 

8) Identify correct Python built-in data types below?
A) bytes
B) bytearray
C) memoryview
D) All the above
Answer [=]
Answer[=]
9) Identify correct built-in Python data types below.
A) list
B) tuple
C) range
D) All the above
Answer [=]
Answer[=]
10) Identify correct Python built-in data types?
A) set
B) frozenset
C) dict
D) All the above
Answer [=]
Answer[=]
11) The None data type in Python is comparable to _____ data type in Java.
A) void
B) null
C) int
D) None of the above
Answer [=]
Answer[=]
12) Identify built-in data type categories in Python.
A) Numeric (int, float, complex), Boolean (True, False), String or Text Sequence type(str)
B) Binary Sequence Type (bytes, bytearray, memoryview), Sequence Type (list, tuple, range)
C) Set type (set, frozenset), Mapping type (dict), None type
D) All the above
Answer [=]
Answer[=]
13) What is the output of given Python program?
a=9; b=-8;
c=a+b;
print(c);
A) 17
B) -1
C) 1
D) Compiler error
Answer [=]
Answer[=]
14) Choose the numeric data type below?
A) 10
B) 10.9
C) 10 + 9j
D) All the above
Answer [=]
Answer[=]


 

15) In Python boolean data types True and False are equivalent to _______ and ______.
A) TRUE and FALSE
B) 1.0 and 0.0
C) 1 and 0
D) None of the above
Answer [=]
Answer[=]
16) Choose the correct floating point number below used in Python language?
A) 10.8
B) 10.00008
C) -10.8e3
D) All the above
Answer [=]
Answer[=]
17) Choose the correct representation of imaginary numbers or complex numbers in Python language.
A) 10 + 8j
B) 15.2 + 8.7j
C) 28J+5.5
D) All the above
Answer [=]
Answer[=]
18) Identify correct representation of String data type i.e "str" in Python below.
A) "Hello examtray"
B) 'Hi! examtray'
C)
"""Hello examtray..
What is your next move"""
or
'''Hello examtray..
What is your next move'''
D) All the above
Answer [=]
Answer[=]
19) A Python string index starts with _____.
A) -1
B) 0
C) 1
D) None of the above
Answer [=]
Answer[=]
20) str() function in Python allows you to create a string from other data types. State TRUE or FALSE.
A) TRUE
B) FALSE
C) -
D) -
Answer [=]
Answer[=]


Like or Share

Show some care. Like or Subscribe. [FB]...[Youtube]

C MCQ App by ExamTray 

Android APP

Java MCQ App by ExamTray 

Android APP
ALL MCQ App by ExamTray Android APP

Ad