Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. def countdown(n):
  2. while n > 0:
  3. print (n)
  4. n = n =2**123
  5. print('Blastoff')
  6.  
  7. countdown(200)
  8.  
  9. n = n =2**123
  10.  
  11. n = n - 1
  12.  
  13. n -= 1
  14.  
  15. def countdown(n):
  16. while n > 0:
  17. print (n)
  18. n = n-1
  19. print("Blastoff")
  20.  
  21. def countdown(n):
  22. for i in reversed( range(n) ):
  23. print i
  24. print "Blastoff"
  25.  
  26. #!/usr/bin/python
  27.  
  28. def countdown(count):
  29. while (count >= 0):
  30. print ('The count is: ', count)
  31. count -= 1
  32.  
  33. countdown(10)
  34. print ("Good bye!")
  35.  
  36. #!/usr/bin/python
  37.  
  38. import time
  39.  
  40. def countdown(count):
  41. while (count >= 0):
  42. print ('The count is: ', count)
  43. count -= 1
  44. time.sleep(1)
  45.  
  46. countdown(10)
  47. print ("Good bye!")
  48.  
  49. The count is: 10
  50. The count is: 9
  51. The count is: 8
  52. The count is: 7
  53. The count is: 6
  54. The count is: 5
  55. The count is: 4
  56. The count is: 3
  57. The count is: 2
  58. The count is: 1
  59. The count is: 0
  60. Good bye!
  61.  
  62. for n in range(10,0,-1):
  63. print(n)
  64.  
  65. #this is generator function
  66. def countdown(start,last):
  67. n=start
  68. while(n>last):
  69. yield n
  70. n-=1
  71.  
  72. for n in countdown(10,0):
  73. print(n)
  74.  
  75. import time
  76. num1 = 100
  77. num2 = 0
  78. while (num1 > num2):
  79. print num1
  80. num1 = num1 - 1
  81. time.sleep(1)
  82.  
  83. import time
  84. start = int(input("How many seconds do you want?nSeconds: "))
  85. for i in range(start,-1,-1):
  86. time.sleep(1)
  87. print(i)
  88. print "Countdown finish!"
  89.  
  90. import time
  91.  
  92. numTimes = int(input("How Many Seconds Do You Wish To Have Untill LiftOff: "))
  93. def countdown(count):
  94. while (count >= 0):
  95. print ("LiftOff In: ", count)
  96. count -= 1
  97. time.sleep(1)
  98.  
  99. countdown(numTimes)
  100. print ("!WE HAVE LIFT OFF!")
  101.  
  102. def countdown (n):
  103. print n
  104.  
  105. while n > 1:
  106. n=n-1
  107. print n
  108.  
  109. print "Blastoff!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement