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 (14 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- coding: utf-8

import time

def while_cuenta_regresiva(numero):
    while(numero > -1):
        print(str(numero) + ' para la explosion!!!')
        time.sleep(1)
        numero = numero -1

numero = eval(input('Escribe un numero: '))
print('Cuenta regresiva usando sentencia while!!')
while_cuenta_regresiva(numero)
print('Kaboooommm!!!, X_X')