sort first half of an array in ascending and second half in descending order code example
Example: sort half in ascendng and descending array
take user inputs for Month and year in integer
Month = int(input('Enter the Month :'))
Year = int(input('Enter the Year :'))
if(Month == 2 and (Year%4 == 0) or ((Year%100 == 0) and (Year%400 == 0))):
print('Number of days is 29')
elif(Month == 2):
print('Number of days is 28')
elif(Month == 1 or Month == 3 or Month == 5 or Month == 7 or Month == 8 or Month == 10 or Month == 12):
print('Number of days is 31')
else:
print('Number of days is 30')