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

3.python Numbers

The document provides an overview of numeric types in Python, including integers, floating-point numbers, and complex numbers. It explains the characteristics of each type, such as the representation of floating-point numbers in scientific notation and the format of complex numbers. Additionally, it notes that while type conversion is possible between different numeric types, conversion from complex numbers to integers or floats is not allowed.

Uploaded by

KARTHIKEYAN S
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

3.python Numbers

The document provides an overview of numeric types in Python, including integers, floating-point numbers, and complex numbers. It explains the characteristics of each type, such as the representation of floating-point numbers in scientific notation and the format of complex numbers. Additionally, it notes that while type conversion is possible between different numeric types, conversion from complex numbers to integers or floats is not allowed.

Uploaded by

KARTHIKEYAN S
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

[Link].

in

Python Numbers
• The numeric types in Python are integers, floating-point numbers, and
complex numbers.

1. Integer (int)
• Integers are whole numbers, positive or negative, without a decimal point
of unlimited length.

2. Floating-point (float)
• Floating-point numbers have a decimal point, positive or negative and can
represent fractional values.

• Floating-point numbers can also be represented using E notation


(scientific notation), where e or E is used to denote powers of 10.

3. Complex Numbers (complex)


• Complex numbers have a real and imaginary part, represented as a + bj,
where j is the imaginary unit.

4. Type Conversion
• Python allows conversion between different numeric types.

1
[Link]

• However, Python does not allow conversion from complex numbers to


integers or floats.

You might also like