diff --git a/countdown.rb b/countdown.rb index 9c36eba..29714ab 100644 --- a/countdown.rb +++ b/countdown.rb @@ -1,4 +1,16 @@ -#write your code here - -def countdown -end +def countdown(x) + + while x > 0 + puts "#{x} SECOND(S)!" + x -= 1 + end + return "HAPPY NEW YEAR!" + end + + def countdown_with_sleep(x) + while x > 0 + sleep(1) + puts "#{x}" + x -= 1 + end +end \ No newline at end of file