16. Dare to compare


#1

Can anyone tell me what is wrong with this code.

test_1 should be false

test_1 = 8 < 10 // false

test_2 = should be false

test_2 = 8 == 10 // false

test_3 = should be true

test_3 = 8 < 10 // true


#2

Hi MegaPlayer,

It appears you have an incorrect assumption about test_1. You are expecting 8 < 10 to be false, but 8 < 10 is a true statement.


#3

can u please tell me what is missing in this code? thanks

test_1 should be false

test_1 = 8 == 10 // false

test_2 = should be false

test_2 = 10 < 8 // false

test_3 = should be true

test_3 = 10 == 10 // true


#4

do this

test_1 = 8 ==10

test_2 = 10 <8

test_3 = 10 == 10

do not use //


#5

can someone tell me what's this symbol mean //
is this a comparators or just a normal symbol?

10 > 8 // true
8 > 10 // false
8 == 10 // false
8 != 10 // true


#6

=begin

test_1 should be false

test_1 = 5 ==8 // false

test_2 = should be false

test_2 = 8<5 // false

test_3 = should be true

test_3 = 5 != 8 // true

=end


#7

That worked! I don't understand why it tells us to put it in, when it screws up the code.


#8

hi help pls,

test_1 should be false

test_1 = 8 > 10 // false

test_2 = should be false

test_2 = 8 == 12 // false

test_3 = should be true

test_3 = 9 < 14 // true


#9

DON'T delete comment

#test_1 should be false
test_1 = 8 == 10

#test_2 should be false
test_2 = 8 > 10

#test_3 should be false
test_3 = 3 == 3


#11

Use || instead of // to do the "or" statement.