In this question x is an integer value whereas y is a float value... an integer value and a float value cannot be equated...so inorder to check equality we have to typecast either float to integer or vice versa... Hope this may help to clear your concept