Skip to content

Instantly share code, notes, and snippets.

@PythonCoderAS
Created June 26, 2018 02:01
Show Gist options
  • Select an option

  • Save PythonCoderAS/8d3401ddd68f51597188195cfe075528 to your computer and use it in GitHub Desktop.

Select an option

Save PythonCoderAS/8d3401ddd68f51597188195cfe075528 to your computer and use it in GitHub Desktop.
Calculate the last day of school for BSGE year 2017-18
from datetime import datetime
from time import sleep
def get_time():
time_left = datetime(2018,6,26,11,10,00) - datetime.now()
if str(time_left)[0] == '-':
print('School is over! Exiting now.')
exit(0)
else:
return str(time_left).split('.')[0]
def main():
while True:
print('\rTime until end of school: '+get_time(), end = '')
sleep(1)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment