From 588bcfd4c56d43d44c70933846506127e9db52a7 Mon Sep 17 00:00:00 2001 From: Tyler Carroll Date: Sat, 12 Oct 2019 04:19:30 +0000 Subject: [PATCH] Done. --- countdown.rb | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/countdown.rb b/countdown.rb index 9c36eba..f70dc39 100644 --- a/countdown.rb +++ b/countdown.rb @@ -1,4 +1,32 @@ #write your code here -def countdown +def countdown(number) + number = 10 + while number > 0 + puts "#{number} SECOND(S)!" + number -= 1 + end + "HAPPY NEW YEAR!" end + +def countdown_with_sleep(sleep) + number = 10 + while number > 0 + puts "#{number} SECOND(S)!" + number -= 1 + end + sleep(5) +"HAPPY NEW YEAR!" +end + + + + + + + + + + + +