+ 1

1! = 4 I do not get the !

23rd Feb 2017, 8:52 PM
Joshua Gaspar
Joshua Gaspar - avatar
4 Respuestas
+ 5
I think the right sintax is: 1 != 4
23rd Feb 2017, 8:54 PM
basusu
+ 2
sorry, yes your right
23rd Feb 2017, 8:55 PM
Joshua Gaspar
Joshua Gaspar - avatar
+ 2
! basically means "not" .. != means not equal if 1 != 4: True, 1 does not equal 4 if 1!= 1: false, 1 does equal 1 and this asked if it was NOT EQUAL.. which it is, thus returning false
23rd Feb 2017, 9:14 PM
LordHill
LordHill - avatar
0
! implies "not". So if you put ! with 1, that means you are negating 1. Which itself is turning to false. != implies "not equal to", here in this case both the operators come together, i.e. 1 != 4 (1 is not equal to 4)
27th Feb 2017, 11:00 AM
Akhil Haridasan
Akhil Haridasan - avatar