MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Python built-in data structures are
A
integer, float, string
B
list, tuple, dictionary, sets
C
Tree, graph
D
None of the above
Explanation: 

Detailed explanation-1: -The four primitive data structures are integers, float, string, and boolean. Non-primitive Data Structures – These data structures store values, as well as a collection of values, in varying formats. The four built-in non-primitive data structures are lists, tuples, dictionaries, and sets.

Detailed explanation-2: -Python has four non-primitive inbuilt data structures namely Lists, Dictionary, Tuple and Set.

Detailed explanation-3: -As seen in the Table 1 above, Numeric or Number types in Python include integers, floating-point numbers, complex numbers and Boolean(subtype of integers). In Python, they are defined as int, float, complex and bool class respectively.

Detailed explanation-4: -Integer ( int ): represents positive or negative whole numbers like 3 or-512. Floating point number ( float ): represents real numbers like 3.14159 or-2.5. Character string (usually called “string”, str ): text. Written in either single quotes or double quotes (as long as they match).

There is 1 question to complete.