♦ Python Numbers
♣ About Python Numbers
There are broadly three Numeric Data Types in Python.Data Type | Description |
---|---|
int | Used to store Natural Numbers |
float | Used to Store real Numbers |
complex | Used to Store Complex Numbers |
♣ Example1: Python Int
Python Int Data Type used to store non-fractional real-numbers(Integers). Example
Input:
Output:
♣ Example2: Python Float
Python Float Data Type used to Store real Numbers. Example
Input:
Output:
♣ Example3: Python Complex
Python Complex Data Type used to Store Complex Numbers. Example
Input:
Output: