Python number example

In Python, anything we can display using print() function. Here we will see Python number example.

#Python number Example

num1=10
num2=12.25

print(type(num1))
print(type(num2))

print(num1)
print(num2)

 

<class 'int'>
<class 'float'>
10
12.25

 

Explanation

  • Here num1 and num2 are two numbers.
  • num1 is integer number and num2 is decimal number.
  • we can heck their type by using type function of Python.
  • we can print numbers using print function.

 

 

Please follow and like us:
READ  Python for loop example