0% found this document useful (0 votes)
8 views2 pages

Data Types Explained: Boolean to Structured

The document defines various data types in programming, including boolean, list, tuple, dictionary, set, categorical, date and time, missing, and structured data types. Each type is described with a definition and an example. The information is concise and provides a clear understanding of different data types and their characteristics.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Data Types Explained: Boolean to Structured

The document defines various data types in programming, including boolean, list, tuple, dictionary, set, categorical, date and time, missing, and structured data types. Each type is described with a definition and an example. The information is concise and provides a clear understanding of different data types and their characteristics.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Q49. What is a boolean data type?

Ans: A boolean data type represents a value that can be either true or false.

Q50. Give an example of a boolean data type.


Ans: Example: True, False

Q51. What is a list data type?


Ans: A list data type is an ordered collection of items, where each item can be of any data
type.

Q52. Give an example of a list data type.


Ans: Example: [1, 2, 3, 4, 5], ["apple", "banana", "orange"]

Q53. What is a tuple data type?


Ans: A tuple data type is similar to a list but is immutable, meaning its elements cannot be
changed after creation.

Q54. Give an example of a tuple data type.


Ans: Example: (1, 2, 3, 4, 5), ("red", "green", "blue")

Q55. What is a dictionary data type?


Ans: A dictionary data type is a collection of key-value pairs, where each key is associated
with a value.

Q56. Give an example of a dictionary data type.


Ans: Example: {"name": "John", "age": 25, "city": "New York"}

Q57. What is a set data type?


Ans: A set data type is an unordered collection of unique elements.

Q58. Give an example of a set data type.


Ans: Example: {1, 2, 3, 4, 5}, {"apple", "banana", "orange"}

Q59. What is a categorical data type?


Ans: Categorical data types represent data that can be divided into distinct categories or
groups.

Q60. Give an example of a categorical data type.


Ans: Example: Gender (Male, Female), Eye Color (Blue, Brown, Green)

Q61. What is a date and time data type?


Ans: Date and time data types represent dates, times, or combinations of both.
Q62. Give an example of a date and time data type.
Ans: Example: 2024-05-22 (date), 12:30:00 (time)

Q63. What is a missing data type?


Ans: Missing data types represent the absence of data or values in a dataset.

Q64. Give an example of a missing data type.


Ans: Example: NaN (Not a Number), NULL, None

Q65. What is a structured data type?


Ans: Structured data types are composed of multiple fields, each with its own data type,
organized in a structured format.

Q66. Give an example of a structured data type.


Ans: Example: A database table with columns like "Name" (string), "Age" (integer), "Gender"
(categorical)

You might also like