Python Bitwise OR

Python Program to illustrate bitwise OR operator

Sample Input 1 :

1 4

Sample Output 2 :

5

Try your Solution

Strongly recommended to Solve it on your own, Don't directly go to the solution given below.

#write your code here

Program or Solution

				
			
					
num1=int(input("Enter your First Number:"))
num2=int(input("Enter your Second Number:"))
num=num1|num2
print("After Bit Wise Or: {}".format(num))

			
				
			

Program Explanation

1 | anything = 1 0 | 0 = 0

Comments