summaryrefslogtreecommitdiff
path: root/Chap15ProjCountdown.py
diff options
context:
space:
mode:
Diffstat (limited to 'Chap15ProjCountdown.py')
-rw-r--r--Chap15ProjCountdown.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Chap15ProjCountdown.py b/Chap15ProjCountdown.py
new file mode 100644
index 0000000..dabcf86
--- /dev/null
+++ b/Chap15ProjCountdown.py
@@ -0,0 +1,17 @@
+#! python3
+
+# Chapter 15 Project Simple Countdown Program
+
+import time
+import subprocess
+
+
+timeLeft = 60
+
+while timeLeft > 0:
+ print(timeLeft)
+ time.sleep(1)
+ timeLeft = timeLeft -1
+
+subprocess.Popen(['start', 'c:\\GbV\\Hit.mp3'], shell=True)
+