Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- # Hacer un script que pida un tiempo y haga una cuenta regresiva y
- # simule una bomba
- # >>> Ingrese tiempo para la explosion: 4
- # 4
- # 3
- # 2
- # 1
- # BOOOM
- # ayuda: funcion time.sleep(1) Tengo que contar segundos --> repeticiones
- # definidas en cantidad --> ciclo for
- import time
- tiempo = int(input("Ingrese tiempo para la explosión: "))
- for t in range(tiempo,0, -1): # tengo que hacer un contador decreciente
- print(t)
- time.sleep(1)
- print("BOOOM")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement