MacSG

Template Lab14_3

May 6th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. day = int(input("Enter day: "))
  2. month = int(input("Enter month: "))
  3. year = int(input("Enter year: "))
  4.  
  5. if #:
  6.     days_in_feb = 29
  7.     days_in_year = 366
  8. else:
  9.     days_in_feb = 28
  10.     days_in_year = 365
  11.    
  12. lst_month = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
  13. day_month = [31,#,31,30,#,#,#,#,#,#,#,31]
  14.  
  15.  
  16. day_number = sum(day_month[:month-1]) + day
  17. remain_day = # - day_number
  18.              
  19. print("%s %s %s is day number %d."%(day,lst_month[#],year,day_number))
  20. print("There are %d days remaining in this year."%remain_day)
Advertisement
Add Comment
Please, Sign In to add comment