From 59ad85c69293de41362ad2b4cb9efd612ceaa077 Mon Sep 17 00:00:00 2001 From: Kelly Manahan Date: Sat, 12 Oct 2019 20:09:34 +0000 Subject: [PATCH] Done. --- countdown.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/countdown.rb b/countdown.rb index 9c36eba..241bee7 100644 --- a/countdown.rb +++ b/countdown.rb @@ -1,4 +1,18 @@ #write your code here -def countdown +def countdown(number) + while number >= 1 + puts "#{number} SECOND(S)!" + number -= 1 end +return "HAPPY NEW YEAR!" +end + +def countdown_with_sleep(number) + while number >= 1 + puts "#{number} SECOND(S)!" + number -= 1 + sleep 1 +end +return "HAPPY NEW YEAR!" +end \ No newline at end of file