title: Python Arrival Time Estimator display problem
body: <p>I need some help with a python program that calculates the estimated hours and minutes for a trip. This should include an estimated date/time of departure and an estimated date/time of arrival. However, I can get to display the following:
  Estimated date of departure (YYYY-MM-DD): 2018-11-29 Estimated time of departure (HH:MM AM/PM): 11:15 PM
  Enter miles: 500 
  Enter miles per hour: 80 </p>
  
  <p>Estimated travel time
  Hours: 6 
  Minutes: 15.0 
  Estimated date of arrival: 2018-11-30 
  Estimated time of arrival: 05:30 AM </p>
  
  <p>Continue? (y/n): n</p>
  
  <pre><code>from datetime import datetime,timedelta
  import locale
  
  mph = 0
  miles = 0
  def get_departure_time():
      while True:
          date_str = input("Estimated time of departure (HH:MM AM/PM):  ")
          try:
              depart_time = datetime.strptime(date_str, "%H:%M %p")
          except ValueError:
              print("Invalid date format. Try again.")
              continue
          return depart_time
  
  
  def get_departure_date():
      while True:
          date_str = input("Estimated date of departure (YYYY-MM-DD): ")
          try:
              depart_date = datetime.strptime(date_str, "%Y-%m-%d")
          except ValueError:
              print("Invalid date format. Try again. ")
              continue
          return depart_date
  
  def distance():
      while True:
          miles = input("Enter miles to be travelled: ")
          try:
              miles = int(miles)
              if miles &lt;= 0:
                  print("Enter a Number Greater than 0.\n")
              else:
                  return miles
          except ValueError:
              print("Format Error . Please Try again\n")
              continue
  
  def speed():
      while True:
          speed = input("Enter miles per hour: ")
          try:
              mph = int(speed)
              if mph &lt;= 0:
                  print("Enter a Number Greater than 0.\n")
              else:
                  return mph
          except ValueError:
              print("Format Error . Please Try again\n")
              continue
          pass
  
  def travel_calculations(miles,mph):
      hours = int(miles/mph)
      minutes = int(((miles/mph)-hours)*60)
      time_travelled = timedelta(hours=hours, minutes=minutes)
  
  
  
      print("\n\nEstimated travel time")
      print("Hours: ", hours)
      print("Minutes: ", minutes)
  
  
  def main():
      print("Arrival Time Estimator\n")
      depart_time = get_departure_time()
      depart_date = get_departure_date()
  
      miles = distance()
      mph = speed()
      travel_calculations(miles,mph)
      return
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>enter code here</p>