Hello everyone!
Let's learn about Python and it's numeric datatype.
Python has three kinds of numeric data type :
1} Int :-
- It represents whole numbers which can be any length.
- Some of the operations are addition, subtraction, multiplication, division.
- It is limited by available memory.
Example: 10, 2, -52, etc.
2} Float :-
- It represents real numbers by using a decimal point.
- It can we accurate within 15 decimal places.
- Operations are similar to integers, but all operations are performed with floating-point arithmetic.
Example: 5.14, -0.05, 2.04.
3} Complex :-
- It represents complex numbers with real and imaginary parts.
- Can access the real and imaginary parts.
- Operations are addition, subtraction, multiplication, division, and other complex arithmetic operations.
Examples: 5 + 4j, -2 - 5j.