Untitled Document
Integers and Floats ( working With Numeric data Type )
1. Program - How to get type of a variable Click Here
```       #********* Source Code From Website - Mangadaku - visit us at -http://mangadaku.com/ *****
# Program How to get type of a variable

#We have type() method which tell us the type of variable
num1 = 3
num2 = 4.16

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

```
```       #********* Source Code From Website - Mangadaku - visit us at -http://mangadaku.com/ *****
# Program - Basic Arithematic Operators
num1 = 3
num2 = 2

print( "Addition of {} + {} : {}" .format(num1,num2,num1+num2))

#Subtraction
print( "Subtraction of {} + {} : {}" .format(num1,num2,num1-num2))

#Multiplication
print( "Multiplication of {} + {} : {}" .format(num1,num2,num1*num2))

#Division
print("Division of {} / {} : {}" .format(num1,num2,num1/num2))

#Floor Division --> This will print only integer value ; decimal values will not be there
print("Division of {} // {} : {}" .format(num1,num2,num1//num2))

#Exponent
print("Exponent of {} ** {} : {}" .format(num1,num2,num1**num2))

#Modulus --> this will return reminder from divison operation ( Hint : such operator is useful in finding even / odd number )
print("Remender  {} % {} : {}" .format(num1,num2,num1%num2))
print("Remender  {} % {} : {}" .format(4,2,4%2))

```
```       #********* Source Code From Website - Mangadaku - visit us at -http://mangadaku.com/ *****
# Program - To Increment Number
# Here we will see two approach to increment the Number
# Approach - 1
num=2
num = num + 1
print(num)

# Approach - 2
num=3
num += 1
print(num)
num *=2
print(num)
```
```       #!/bin/ksh
#********* Source Code From Website - Mangadaku - visit us at -http://mangadaku.com/ *****
# Program - Few More Operations on Numbers

#Chnaging Numbers into absolute value
num = -3
print("Absolute value of {} is : {} " .format(num,abs(num)))

#Rounding Numbers to nearest interger whole value
num=3.75
print("Nearest Integer value for {} is {}".format(num,round(num)))

#One more way by specifying range
num=3.75
print("Nearest Integer value for {} is {}".format(num,round(num,1)))
```
```       #********* Source Code From Website - Mangadaku - visit us at -http://mangadaku.com/ *****
# Program - Number Comparison Operator

num1 = 3
num2 = 2

#Equal-Equal;  == ( Operator )

print( num1 == num2)
print("----------------")

#Not Equal ; != ( Operator )

print( num1 != num2)
print("----------------")

#Greater Than ; > ( Operator )
print( num1 > num2)
print("----------------")

#Less Than ; < ( Operator )
print( num1 < num2)
print("----------------")

# Greater Or Equal ; >= ( Operator )
print( num1 >= num2)
print("----------------")

# Less Or Equal ; <= ( Operator )
print( num1 <= num2)
print("----------------")

```
```       #********* Source Code From Website - Mangadaku - visit us at -http://mangadaku.com/ *****