Page 192 - AI Ver 1.0 Class 10
P. 192
• float: It is a real number with floating point representation. For example: 15.5,12.0. It can also be represented
using the exponent notation E like 1E5 is 100000.
• complex: It is made up of a Real Number and an Imaginary Number. For example: 3+2i where 3 is a real number
and 2i is an imaginary number.
None
None is a special data type with NULL or nothing/no value. It does not mean 0, False or empty. It is represented
by None.
Sequence
Sequence is a collection of data stored under a common name. Each value is referred by its index number. It can
be mutable or non-mutable. There are three types of data as sequence in Python:
• String: It is a sequence of unicode characters enclosed in single or double quotes. Multi-line strings can be
created using triple quotes (single or double), its length is dependent on the available memory. It can also be
empty where we have just empty quotes with no value. For example:
• Lists: It is a sequence of heterogeneous values arranged as elements and are referred by an index number.
These values are separated by comma and are enclosed in square brackets [ ]. They are mutable data types i.e,
values can be changed by the user. For example:
• Tuples: It is a sequence of heterogeneous values arranged as elements and are referred by an index number.
These values are separated by comma and are enclosed in circular brackets (). They are immutable i.e.; values
cannot be changed by the users.
For example:
t = (10,20,30)
fruits = ('apple', 'orange', 'banana')
Boolean
Boolean is a data type with two built in values- True or False. They are used in logical evaluation. A True
statement returns value 1 while a False statement returns value 0. For example:
190 Touchpad Artificial Intelligence-X

