Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- def timer():
- print("Welcome to Cody's badclock v1.7")
- cstart = input("Type anything and press enter to begin: ")
- if cstart != " ":
- loopydoop = True
- s = 0
- m = 0
- timeLoop = cstart
- while loopydoop:
- s += 1
- print(str(m) + " Minutes " + str(s) + " Seconds ")
- time.sleep(1)
- if s == 59:
- s = 0
- m += 1
- print(str(m) + " Minute")
- def nclock():
- import time
- while True:
- from datetime import datetime,strftime
- ctime = datetime.now()
- #print (strftime("%m/%d/%Y %H:%M:%S"), end="", flush=True)
- #print("\r", end="", flush=True)
- time.sleep(1)
- print "Welcome to my project. You can use a 'clock', a 'timer', or a 'countdown'"
- dec = raw_input("What would you like to try? ")
- if dec == "clock":
- nclock()
- elif dec == "timer":
- timer()
- elif dec == "countdown":
- print "Not yet ready"
- else:
- print "Incorrect option"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement