Professional Documents
Culture Documents
import random
import math
sum1 = u + v
var_int = 123
var_flo = 1.23
print("datatype of num_int:",type(var_int))
print("datatype of num_flo:",type(var_flo))
print("Value of num_new:",var_new)
print("datatype of num_new:",type(var_new))
var3 = "Hello"
var4 = 10
var5 = 2
1
addt = var4 + var5
var6 = 3
var7 = 2+2j
var8 = 3+4j
x =1
y = 2.0
z = 2+3j
2
a=float(x)
b=int(x)
c=complex(x)
d=complex(y)
print(a,type(a))
print(b,type(b))
print(c,type(c))
print(d,type(d))
print("Random numbers",random.randrange(1,15))
f=1.01
g=4.45
a1=-1.5
b1=2.3
c1=0
d1=2
power=2
a2=2.3
a3=-10
b3=5
c3=15
Output
>>>
= RESTART:
C:/Users/UMASIKAMANI/AppData/Local/Programs/Python/Python39/lab
prg/labprg1.py
4
Enter second number :200
10 Mod of 3 = 1
1 <class 'int'>
Random numbers 12
>>>