Skip to content

Instantly share code, notes, and snippets.

@racinmat
Created August 11, 2017 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save racinmat/5a4ff27ef19d20e5893c00517e85cc9d to your computer and use it in GitHub Desktop.
Save racinmat/5a4ff27ef19d20e5893c00517e85cc9d to your computer and use it in GitHub Desktop.
null created by racinmat - https://repl.it/KGLh/0
import time
now = time.localtime()
hour = now.tm_hour
if hour < 8: print('sleeping')
elif hour < 9: print('commuting')
elif hour < 17: print('working')
elif hour < 18: print('commuting')
elif hour < 20: print('eating')
elif hour < 22: print('resting')
else: print('sleeping')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment