i

Python Programming

Python Numbers

Integers, floating-point numbers and complex numbers are integer, float and complex class.

type() function is used to identify which class a variable or value belongs:

Integers are any length subject to memory available.

Floating-point numbers are only accurate up to 15 decimal places. 1 is an integer, 1.0 is the floating-point NUMBER.

Complex numbers used to written in different form like a + jk, in this case j is some imaginary part while a and k is real part. Below is explanation with example.

print(b)         

#output

0.12345678901234568