Post

Prem Prakash
Prem Prakash@4EverPrem·
@Python_Dv 15. & is bitwise and operator which returns 1 if both bits are 1 else 0. bin(1) = 0001 bin(12) = 1100 =========== 0000
English
0
0
0
146
R. Stephen Ruiz
R. Stephen Ruiz@rslruiz·
@Python_Dv A. 15 """ x&1==0 # the bitwise operators has a higher precedence than the comparison operators, thus 0==0 # hence the if condition is True. """
English
0
0
0
113
Rakesh Das
Rakesh Das@RakeshDas_18·
@Python_Dv A. 15 is the output. Here's why: 1. The code checks if x &1 == 0 that is true. 2. Since x is true, the result is set to y which is 15. Therefore, the final output is 15.
English
0
0
0
183
Paylaş