print "Type an Integer"
numb=int(input())
if numb<=5:
print "Good Choice!"
print "Thank You!"
print "Enter year : "
year= int(input())
if year%4 == 0 and year%100 != 0 or year%400 == 0:
print year,"is a leap year"
else:
print year,"is not a leap year"
print "Enter Year :"
year=int(input())
if year%4 == 0 :
if year % 100 != 0:
print year,"is leap year"
else:
if year%400 == 0:
print year," is leap year"
else:
print year,"is not a leap year"
print "Enter the number"
numb =int(input())
if numb<=100:
if numb>=30:
print numb,"lies between 30-100"
else:
print numb,"is outside 30-100"
print "Enter choice of city(1-4)"
city = int(input())
if city == 1:
print "Madurai"
elif city == 2:
print "Chennai"
elif city == 3:
print "Mumbai"
elif city == 4:
print "Calcutta"
numb=int(input("Enter the number"))
if numb == 0:
print "prints case0"
elif numb == 1:
print "prints case1"
elif numb == 2:
print "prints case2"
else:
print
import array
i =20
variable =array.array('i',[])
size = 0
def get_array_size():
print "Array-size :"
global size
size=int(input())
if size<1 or size>i :
get_array_size()
def input_fetch():
global size
global variabless
for k in range(0,size):
m=int(input())
variable.append(m)
return
def sort_list():
global variable
variable= array.array('i',sorted(variable))
return
def output():
for k in range(0,size):
print variable[k],
return
def even(number):
if number/2 == 0:
return 1
else:
return 0
get_array_size()
input_fetch()
sort_list()
print "The sorted list is :"
output()
print "\nMedian : ",
median=round((variable[(size/2)-1]+variable[size/2])/2,3) if even(size) else float(variable[size/2])
print median
index = 1
while index<12:
print "This is line ",index
index+=1
print "Enter Integer"
total_sum=0
numb=int(input())
while numb>0:
digit=numb %10
total_sum+=digit
numb/=10
print "Sum is ",total_sum
print "Enter Integer:"
numb=int(input())
print numb,"is reversed as ",
while numb>0:
digit=numb%10
print digit,
numb/=10
print "\n"
for index in range(1,11):
print " line ",index
print "Result"
print "Index Index Squared"
print "_____ _____________"
for index in range(1,11):
print index," ",index*index
total_sum=0
value=100
for index in range(1,value+1):
total_sum+=index
print "Sum of 1 to ",value," = ",total_sum
def exceptive():
for index in range(1,90):
if index%5 == 0:
continue
print index
exceptive()