FED UP PURSUING LESSON 17 FOR LONG LONG TIME.Codecademy does not want me to carry on with this course


#1

Here is my code . The editor says put an expression against each.

test_1 should be true

test_1 = (1 == 1) && ( 2 == 2 )

test_2 =should be true

test_2 = ( 1 == 2 ) || ( 2 == 2 )

test_3 = should be false

test_3 = !( 1 == 2 ) || ( 2 == 2 )
end


#2

I don't really know any ruby, so I could definitely be wrong, but the third one should evaluate to false and that looks to me like it'll evaluate to true. You could print it out to see if this is the case.


#3

Yeah, the third test should evaluate to true because:

(1 equals 2) is false, but then becomes true when you take account of the !
(2 equals 2) is true
When you put them together, they become true or false.
Therefore they evaluate to true because true or false always evaluates to true.

Sorry if this is confusingly explained, I've just started learning Ruby and I'm not a great explainer!