Or And syntax (||; &&) with two arguments
<p>I am writing this code to check if a number is even and divisible by 7. The objective is to make use of "&amp;&amp;" or "||". Since I want both even number and divisible by 7, it will be "&amp;&amp;".This is my code.</p>

<pre><code>input = gets.to_i
def divisible_by_seven?(input)

    div_by_seven = input % 7
    is_even = is_even?(input)

    if div_by_seven == 0 &amp;&amp; is_even == true 
        return "is divisible by 7 and is even"

    elsif div_by_seven == 0 &amp;&amp; is_even == false
        return "is divisible by 7 but is not even"

    elsif div_by_seven != 0 &amp;&amp; is_even == true
        return "is not divisible by 7 but is even"

    else
        return "is not divisible by 7 and is not even"
    end    
end

puts "#{input} #{is_even_and_divisible_by_seven?(input)}"
</code></pre>

<p>Is there a way to better write this?</p>