LoveHecate

[PYTHON] FULL Calculator w/ 60s Timer

Jul 21st, 2017
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.58 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import time
  4.  
  5. print ("                                                  >>OPTIONS<<")
  6. print ("           _            _       _             [1] Subtraction")
  7. print ("  ___ __ _| | ___ _   _| | __ _| |_ ___  _ __ [2] Addition")
  8. print (" / __/ _` | |/ __| | | | |/ _` | __/ _ \| '__|[3] Floor Division")
  9. print ("| (_| (_| | | (__| |_| | | (_| | || (_) | |   [4] Modulo")
  10. print (" \___\__,_|_|\___|\__,_|_|\__,_|\__\___/|_|   [5] Division")
  11. print ("                                              [6] 60s Timer")
  12. option = input("Enter Option: ")
  13.  
  14. if option == 1:
  15.   a = input ("Enter First Number: ")
  16.   b = input ("Enter Second Number: ")
  17.   print (a - b)
  18.   print ("Calculator Coded By: Love Hecate")
  19.  
  20.  
  21. elif option == 2:
  22.   c = input ("Enter First Number: ")
  23.   d = input ("Enter Second Number: ")
  24.   print (c + d)
  25.   print ("Calculator Coded By: Love Hecate")
  26.  
  27.  
  28. elif option == 3:
  29.   e = input ("Enter First Number: ")
  30.   f = input ("Enter Second Number: ")
  31.   print (e // f)
  32.   print ("Calculator Coded By: Love Hecate")
  33.  
  34.  
  35. elif option == 4:
  36.   g = input ("Enter First Number: ")
  37.   h = input ("Enter Second Number: ")
  38.   print (g % h)
  39.   print ("Calculator Coded By: Love Hecate")
  40.  
  41.  
  42. elif option == 5:
  43.   i = input ("Enter First Number: ")
  44.   j = input ("Enter Second Number: ")
  45.   print (i / j)
  46.   print ("Calculator Coded By: Love Hecate")
  47.  
  48.  
  49. elif option == 6:
  50.  print ("CTRL + C To Exit !")
  51.  try:
  52.   i = 1
  53.   while i <=60:
  54.     print(i)
  55.     time.sleep (1)
  56.     i = i + 1
  57.   print ("Stop Watch Coded By: Love Hecate")
  58.  except KeyboardInterrupt:
  59.   print("\nBye!")
Advertisement
Add Comment
Please, Sign In to add comment