#Simple program to calculate when is the best time to issue WARNO #and begin planning. Based on one-third/two-third methodology. #User needs to enter times according to standard military format #e.g. April 17th, 2014 at 2:30pm is 171430APR14 def Opord (): Now = raw_input('What time is it now? ') Then = raw_input('What time do you leave? ') # Begin variables for Now dateNow = Now[0:2] timeNow = Now[3:6] monthNow = Now[7:9] yearNow = Now[10:11] # Begin variables for Then dateThen = Then[0:2] timeThen = Then[3:6] monthThen = Then[7:9] yearThen = Then[10:11] if dateNow == dateThen: print "Looks good"
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question