title: Python Calendar
body: <p>Create a calendar program that allows the user to enter a day, month, and year in three separate variables as shown below.</p>
  
  <pre><code>Please enter a date
  
  Day:
  
  Month: 
  
  Year: 
  </code></pre>
  
  <p>Then, ask the user to select from a menu of choices using this formatting:
  Menu:</p>
  
  <pre><code>1)   Calculate the number of days in the given month.
  
  2)   Calculate the number of days left in the given year.
  </code></pre>
  
  <p>The program must include the following functions:
  leap_year: Takes the year as a parameter and returns 1 if a year is a leap year
   (Links to an external site.)
   and 0 if it is not. This information will only be used by other functions.
  number_of_days: This subprogram will accept two parameters in the following order: month and year. It will return how many days are in the given month
   (Links to an external site.)
  .
  daysunderscoreleft: This will accept three parameters in the following order: day, month, and year. It should calculate the number of days left in the year, and return the value of number of days left. This should not include the date the user entered in the count.</p>
  
  <pre><code>def is_leap_year(year):
      return (year % 4 == 0) and (year % 100 != 0) or (year % 400 == 0)
  
  def days_in_month(month, year):
  
      if month in ['September', 'April', 'June', 'November']:
          print("30")
  
  
      elif month in ['January', 'March', 'May', 'July', 'August','October','December']:
          print("31")
  
      elif month == 'February' and is_leap_year(year) == True:
          print("29")
  
      elif month == 'February' and is_leap_year(year) == False:
          print("28")
  
      else:
          return None
  
  print("Please enter a date: ")
  x = int(input("Day: "))
  y = str(input("Month: "))
  
  z = str(input("Year: "))
  
  print("Menu:")
  o = int(input("1)    Calculate the number of day in the given month. \n2)    Calculate the number of days left in the given year. "))
  
  
  if(o == "2"):
      print (days_in_month(y,z))
  </code></pre>
  
  <p>This is what I have so far. I am kind of confused on how to find the number of days left in a month and year and I just need help with that. Sorry for the messy format, I didn't know how to format it correctly. </p>