From 864f37b576adaec688413afdc5f7cad6005f96a6 Mon Sep 17 00:00:00 2001 From: Mark Paul Date: Tue, 29 Oct 2019 16:44:28 +0000 Subject: [PATCH] Done. --- countdown.rb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/countdown.rb b/countdown.rb index 9c36eba..28702b9 100644 --- a/countdown.rb +++ b/countdown.rb @@ -1,4 +1,19 @@ #write your code here -def countdown +def countdown(num) +while num > 0 + puts "#{num} SECOND(S)!" + num -= 1 + end + "HAPPY NEW YEAR!" +end + + +def countdown_with_sleep(num) + while num > 0 + puts "#{num} SECOND(S)!" + sleep(1) + num -= 1 + end + "HAPPY NEW YEAR!" end