Last active
February 11, 2018 15:03
-
-
Save awgreene/9a834e95312e758e8c3f52f880355e07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import argv | |
from time import sleep | |
# Set time to first argument | |
time = argv[1] | |
# Set seconds to integer representation of time | |
seconds = int(time) | |
# Make sure time provided is greater than or equal to zero | |
if(seconds < 0): | |
print("Time must be greater than or equal to zero") | |
quit() | |
# Start countdown | |
while(seconds > 0): | |
print(str(seconds) + " second(s) remaining...") | |
seconds -= 1 | |
sleep (1) | |
print("Beep! Beep! Beep! " + time + " second(s) have passed!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment