Declare a variable and check the type of varible either it is integer,Float or String.
x = 1
print(type(x))
<class 'int'>
y = 10.8
print(type(y))
<class 'float'>
z = 10+1j
print(type(z))
<class 'complex'>
import random
print(random.randrange(1, 50))
21
a = 10 # integer
b = 12.6 # float
# Conversion from integer to float:
l = float(a)
# Conversion from float to integer:
m = int(b)
print(l)
print(m)
10.0 12
a = 10 # integer
b = 12.6 # float
c = 10+1j # complex
print(b)
print(c)
12.6 (10+1j)