Difference between any and all in python
all([0,0,0,1]) will return False
all([0,0,0,0]) will return False
all([0,0,0,1]) will return True
all([0,0,0,0]) will return False
Rules of binary addition.
Rule 1: 0 + 0 = 0 ; Carry 0.
Rule 2: 0 + 1 = 1 ; Carry 0.
Rule 3: 1 + 0 = 1 ; Carry 0.
Rule 4: 1 + 1 = 0 ; Carry 1.
Rule 5: 1+1+1=1; Carry 1.
what does % and // means in python.
tell 3%2 and 3//2
3%2 means - when we divide 3 by 2 what is the remainder here it will be 1.
3//2 means - when