Queer European MD passionate about IT

meal.py 343 B

1234567891011121314151617
  1. def main():
  2. t = convert(input("What time is it?\t\t"))
  3. if 7 <= t <= 8:
  4. print("breakfast time")
  5. elif 12 <= t <= 13:
  6. print("lunch time")
  7. elif 18 <= t <= 19:
  8. print("dinner time")
  9. def convert(time):
  10. h ,m = map(int, time.split(":"))
  11. return float(h + m / 60)
  12. if __name__ == "__main__":
  13. main()