Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. import time
  2. def timer():
  3. print("Welcome to Cody's badclock v1.7")
  4. cstart = input("Type anything and press enter to begin: ")
  5. if cstart != " ":
  6. loopydoop = True
  7. s = 0
  8. m = 0
  9. timeLoop = cstart
  10. while loopydoop:
  11. s += 1
  12. print(str(m) + " Minutes " + str(s) + " Seconds ")
  13. time.sleep(1)
  14. if s == 59:
  15. s = 0
  16. m += 1
  17. print(str(m) + " Minute")
  18. def nclock():
  19. import time
  20. while True:
  21. from datetime import datetime,strftime
  22. ctime = datetime.now()
  23. #print (strftime("%m/%d/%Y %H:%M:%S"), end="", flush=True)
  24. #print("\r", end="", flush=True)
  25. time.sleep(1)
  26. print "Welcome to my project. You can use a 'clock', a 'timer', or a 'countdown'"
  27. dec = raw_input("What would you like to try? ")
  28. if dec == "clock":
  29. nclock()
  30. elif dec == "timer":
  31. timer()
  32. elif dec == "countdown":
  33. print "Not yet ready"
  34. else:
  35. print "Incorrect option"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement