I don't understand the purposed of the last two lines in the prescribed structure / how to format program in this structure. Prescribed structure:
def main():
...
def convert(time):
...
if __name__ == "__main__":
main()
currently I have the following code which seems to output correct meal times but doesn't meet requirements for check50 - not sure how to properly adjust the structure of my code to include the last bit of the prescribed structure and pass check50
def main():
x=input('What time is it? ')
x=convert(x)
if 7<=x<=8:
print('breakfast time')
elif 12<=x<=13:
print('lunch time')
elif 18<=x<=19:
print('breakfast time')
def convert(time):
h,m=time.split(':')
time=float(h)+(float(m)/60)
return(time)
main()
Any guidance on what I am missing here would be greatly appreciated :)