Python Programming - Data Types
Exercise : Data Types - General Questions
- Data Types - General Questions
16.
Which of the following data types is used to represent a date and time?
Answer: Option
Explanation:
The
datetime
data type in Python is used to represent a date and time. It is part of the datetime module in Python's standard library.
17.
Which of the following data types is used to represent a binary data?
Answer: Option
Explanation:
The
bytes
data type in Python is used to represent binary data, such as an image or audio file.
18.
Which of the following data types is used to represent a sequence of immutable elements?
Answer: Option
Explanation:
Tuples are used to represent a sequence of immutable elements, similar to lists, but tuples cannot be modified.
19.
Which of the following data types is used to represent a complex number?
Answer: Option
Explanation:
The
complex
data type in Python is used to represent complex numbers, which are numbers with a real and imaginary component.
20.
Which of the following data types is used to represent a collection of elements in a specific order with duplicates allowed?
Answer: Option
Explanation:
Lists are used to represent a collection of elements in a specific order, and duplicates are allowed.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers