The task is to create number variables to store integer, float and complex number, we have to print their types and values also in python.
Python numbers
There are three types of numbers in python:
- Integer number
- Float number
- Complex number
In the below-given program, we are creating different variables to store the numbers and printing their types and values.
Python code to create number variables, print types and values
Output
Assigning integer number in binary, decimal, octal, and hexadecimal format
Output
need an explanation for this answer? contact us directly to get an explanation for this answer