From 0ea8891610f758300bc427eca8c9a45f95e19b5a Mon Sep 17 00:00:00 2001 From: deezy13 Date: Mon, 14 Oct 2019 02:10:06 +0000 Subject: [PATCH] Done. --- countdown.rb | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/countdown.rb b/countdown.rb index 9c36eba..cadd738 100644 --- a/countdown.rb +++ b/countdown.rb @@ -1,4 +1,23 @@ #write your code here -def countdown -end +def countdown(num) + + while num > 0 +puts "#{num} SECOND(S)!" +num -=1 +end +p "HAPPY NEW YEAR!" +end + + +def countdown_with_sleep(num) + + sleep(5) + + while num > 0 +puts "#{num} SECOND(S)!" +num -=1 +end +p "HAPPY NEW YEAR!" +end +