hi ... im trying to write a function that tells you if the time you called is a correct military time .... heres what i have so far
def valid_mil_time(mtime):
if mtime <= 2359 :
print ("true")
else:
print ("false")
but if i was to call it, it looks like this
>>> from valid_mil_time(1299)
true
but i know this isnt true because there is no such time 1299 ...im tryn to get python to say for and example, if mtime is between 1200 and 1259 print true .... for each hour like..... 0000 and 0059, 0100 0159, ...sorry if im not explaining it correctly
please help!