Skip to content

Commit

Permalink
Merge pull request mouredev#4365 from ShinMugenNoKabe/reto27
Browse files Browse the repository at this point in the history
Reto mouredev#27 - Python
  • Loading branch information
kontroldev authored Jul 30, 2023
2 parents 31214c5 + 374595f commit 8954e98
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Retos/Reto #27 - CUENTA ATRÁS [Media]/python/ShinMugenNoKabe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import time


def countdown(start: int, seconds: int):
if start < 0 or seconds < 0:
raise ValueError("Introduce un número válido")

for i in range(start, -1, -1):
print(i)

if i != 0:
time.sleep(seconds)


if __name__ == "__main__":
countdown(10, 1)
print("----------")
countdown(7, 3)
print("----------")
countdown(20, 0)

0 comments on commit 8954e98

Please sign in to comment.