Decode School

Decode School - The School for Problem Solvers
Welcome to My Blog.
Need Assignment / Project Guidance (or) Training in Python?

Python Bitwise OR

Python Program to illustrate bitwise OR operator

Sample Input 1 :

1 4

Sample Output 2 :

5

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