sort half in ascendng and descending array

Solutions on MaxInterview for sort half in ascendng and descending array by the best coders in the world

showing results for - "sort half in ascendng and descending array"
Pedro
02 Feb 2016
1take user inputs for Month and year in integer
2Month = int(input('Enter the Month :'))
3Year = int(input('Enter the Year :'))
4#Check condition for Month and leap year
5if(Month == 2 and (Year%4 == 0) or ((Year%100 == 0) and (Year%400 == 0))):
6    #if condition is TRUE
7    print('Number of days is 29')
8#if False check for other conditions
9elif(Month == 2):
10    print('Number of days is 28')
11elif(Month == 1 or Month == 3 or Month == 5 or Month == 7 or Month == 8 or Month == 10 or Month == 12):
12    print('Number of days is 31')
13else:
14    print('Number of days is 30')
15
similar questions
queries leading to this page
sort half in ascendng and descending array