I made a solution for problemset 1, Meal Time from CS50P and I can't get a check from check50. The code works for me if I input the code myself but when I run check50 I get the error: I found the correct code here: Meal Time issues
But I can't find the problem in my code when I compare it with the code of the commentator.
My code:
def main():
n = input("What time is it? ").split(":")
answer = convert(n)
if 7 <= answer <= 8:
print("breakfast time")
elif 12 <= answer <= 13:
print("lunch time")
elif 18 <= answer <= 19:
print("dinner time")
else:
print("")
def convert(time):
time = float(time[0]) + (float((time[1])) / 60)
return time
if __name__ == "__main__":
main()