#Program using if with multiple statements
#Variable Declaration
i=0
#User Input
i =int(raw_input("Give the numbers less than 10"'\n'))
if i<=10: #Checking the given value
#Result
print "The given value of", i , "less than 10"
##Program for interchange two values using if statement
#Variable Declaration
a=m=n=0
#User Input
m=int(raw_input("Give the value of m" '\t'))
n=int(raw_input("Give the value of n" '\t'))
if m>=n : #Checking the Given Values
a=m # method for swapping
m=n
n=a
#Result
print "The Swapped Values of m and n are ", m,a
#determine the given number is odd or even.
#Variable Declaration
num=rem=0
#User Input
num=input("Enter the value: ")
rem=num%2
if rem==0 : #Checking condition
#Result 1
print "The given number is Even"
else :
#Result 2
print "The given number is Odd"
# Find floating point input using if-else statement
#Variable Declaration
years=seconds=0.0
life=0
years=float(raw_input("Give your Age in years: "))
life=years
if life==0:
print "The given age is not floating value"
else :
seconds="%f"%float(years*365*24*60*60)
print "You have lived for", seconds, "seconds"
# find biggest among two numbers
#Variable Declaration
i=j=big=0
i,j=input("Give two values: ")
big=i
if big<j :
big=j
elif i<j :
big=j
else:
big = i
print "Biggest number of two numbers: ",big
print "Biggest of two numbers(using else) is: ",big
# Program using nested if....else
#Variable Declaration
n=0
#User Input
n=int(raw_input("Enter the number"))
if n==15: #Checking Condition
print "Play Foot ball"
elif n==10:
print "Play Cricket"
else :
print "Don't Play"
#print the number between 10 and 20
#Variable declaration
i=0
#User Input
i=input("Enter the number: ")
if (i>10) & (i<20):
print "The given value is in between 10 and 20"
else :
print "The given value is greater than 20 and less than 10"
# display the types of characterusing if-else statement
#User Input
chr= raw_input("Enter a Single Character: ")
if( ((chr>='a') & (chr<='z')) | ((chr>='A') & (chr<='Z'))):
print "Given charactered is an Alphabetic"
elif ((chr>='0') & (chr <='9')):
print "Given Character is a digit"
else:
print "Entered Character is a special character"