Omit needless words


Hit Run but no error message. Cant advance.

$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)

"n must be an integer" unless n.is_a? Integer  
"n must be greater than 0" if n <= 0
  prime = Prime.instance
  prime.first n 

puts first_n_primes(10). 

Any help would be greatly appreciated.


Try taking off the dot at the end of the closing ).


I took it out. Still doesnt work.
But thanks though.
Any other ideas?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.