Python Numeric Datatype

in python •  5 months ago 

Hello everyone!

1000015958.webp

Let's learn about Python and it's numeric datatype.

1000015957.webp

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.

1000015956.webp

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!