Ruby Tutorial - Object Methods

  • + 0 comments

    This is BULL SHIT! How can I trust a challenge platform that works like this:

    def odd_or_even(number)
      number.even?
    end
    
    (0...gets.to_i).each do |i|
        puts odd_or_even(gets.to_i)
    end
    

    input (stdin) 5 2 4 3 5 8

    Your Output (stdout) true true false false true

    Expected Output true true false false true