54 lines
1.3 KiB
Python
54 lines
1.3 KiB
Python
|
|
data1 = 6
|
|
data2 = 4
|
|
|
|
|
|
print("-------------Integer addition")
|
|
|
|
result = data1 + data2
|
|
|
|
print("The value of data1 is ",data1)
|
|
print("The value of data2 is ",data2)
|
|
print("The value of result is ",result)
|
|
|
|
print("The type of data1 is ",type(data1) )
|
|
print("The type of data2 is ",type(data2) )
|
|
print("The type of result is ",type(result) )
|
|
|
|
print("-------------Integer subtraction")
|
|
|
|
result = data1 - data2
|
|
|
|
print("The value of data1 is ",data1)
|
|
print("The value of data2 is ",data2)
|
|
print("The value of result is ",result)
|
|
|
|
print("The type of data1 is ",type(data1) )
|
|
print("The type of data2 is ",type(data2) )
|
|
print("The type of result is ",type(result) )
|
|
|
|
print("-------------Integer multiplication")
|
|
|
|
result = data1 * data2
|
|
|
|
print("The value of data1 is ",data1)
|
|
print("The value of data2 is ",data2)
|
|
print("The value of result is ",result)
|
|
|
|
print("The type of data1 is ",type(data1) )
|
|
print("The type of data2 is ",type(data2) )
|
|
print("The type of result is ",type(result) )
|
|
|
|
print("-------------Integer division")
|
|
|
|
result = data1 / data2
|
|
result1 = int(result)
|
|
|
|
print("The value of data1 is ",data1)
|
|
print("The value of data2 is ",data2)
|
|
print("The value of result is ",result)
|
|
|
|
print("The type of data1 is ",type(data1) )
|
|
print("The type of data2 is ",type(data2) )
|
|
print("The type of result is ",type(result) )
|
|
print("The type of result1 is ",type(result1) )
|