Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. def start():
  2. print "Welcome to my countdown thingy!"
  3. print "All you have to do to use my program is type in a number when it asks for it and it will count down from your number to what specify by what incrament you specify."
  4. print "Lets begin, shall we?"
  5. print " "
  6. num()
  7. def num():
  8. strt = raw_input("What is your starting number?")
  9. strt = int(strt)
  10. print " "
  11.  
  12. incr = raw_input("By what increment should it decrease?")
  13. incr = int(incr)
  14. print " "
  15.  
  16. end = raw_input("What is your ending number?")
  17. end = int(end)
  18.  
  19. print " "
  20. cur = strt
  21. begin()
  22. def begin():
  23. cur2 = cur - incr
  24. if cur == end:
  25. stop()
  26. else:
  27. begin()
  28. def stop():
  29. print " "
  30. print " "
  31. print "Done!"
  32. print " "
  33. ans = raw_input("Would you like to do it again? (y or n)")
  34. if ans == "y":
  35. print "Starting again!"
  36. print " "
  37. print " "
  38. num()
  39. elif ans == "n":
  40. print "Sad to see you go!"
  41. print "Goodbye!"
  42. raw_input(" ")
  43. else:
  44. raw_input("ERROR! PRESS ENTER")
  45. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement