File: Tutorial_02_while.py

package info (click to toggle)
sugar-pippy-activity 76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,664 kB
  • sloc: python: 5,860; makefile: 16; sh: 1
file content (12 lines) | stat: -rw-r--r-- 327 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
import time

def while_backward_count(number):
    while(number > -1):
        print(str(number) + " for the explosion!!!")
        time.sleep(1)
        number = number -1

number = eval(input('Enter a number: '))
print("Let's count backward using a while sentence!!")
while_backward_count(number)
print("Kaboooommm!!!, X_X")