This code is supposed to print the day corresponding to a date..... The main() function is not being executed.....why?
date=input("Enter the date in 'dd/mm/yyyy' format") day=int(date[0:2]) month=int(date[3:5]) year=int(date[6:11]) def calculate(): a=int(year/4) b=int(year/100) c=int(year/400) if (year%4==0 and year%100!=0) or (year%4==0 and year%400==0): yearcount=(year-1)*365+a-b+c-1 else: yearcount=(year-1)*365+a-b+c ar=[31,28,31,30,31,30,31,31,30,31,30,31] i=0 monthcount=0 while(i<month): monthcount+=i total=yearcount+monthcount+day return total def giveDay(total): if total<7: if total==0: print(date,"/",month,"/",year," is Sunday!") elif total==1: print(date,"/",month,"/",year," is Monday!") elif total==2: print(date,"/",month,"/",year," is Tuesday!") elif total==3: print(date,"/",month,"/",year," is Wednesday!") elif total==4: print(date,"/",month,"/",year," is Thursday!") elif total==5: print(date,"/",month,"/",year," is Friday!") elif total==6: print(date,"/",month,"/",year," is Saturday!") else: if total%7==0: print(date,"/",month,"/",year," is Sunday!") elif total%7==1: print