Omit needless words

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/ruby-beginner-en-Zjd2y/0/3?curriculum_id=5059f8619189a5000201fbcb

<In what way does your code behave incorrectly? Include ALL error messages.>
As far as I know my code is correct. It doesn’t return an error but instead says “The program took too long to respond. Check your code for infinite loops and try again.” Could someone please explain to me why this is happening? Thank you!

```

$VERBOSE = nil # We’ll explain this at the end of the lesson.
require ‘prime’ # This is a module. We’ll cover these soon!

def first_n_primes(n)

return “n is a interger.” unless n.is_a? Interger

return “n must be greater than 0.” if n <= 0

prime_array ||=

prime = Prime.new
for num in (1…n)
prime_array.push(prime.next)
end
return prime_array
end

<do not remove the three backticks above>

The correct spelling is, integer.

Should read,

"n must be an integer"
1 Like