+ 1

what is the output of this code and why?

a=5|5 b=10|5 print(a+b)

29th Apr 2020, 8:55 AM
Tasnim Tahmid Miyad
Tasnim Tahmid Miyad - avatar
3 ответов
+ 4
Tasnim Tahmid Miyad It's Bitwise operations operand then a=101 | 101 that is 101(5) b=1010 | 101 that is 1111(15) So a+b=15+5=20
29th Apr 2020, 9:26 AM
Shaurya Barnwal
+ 1
Tasnim Tahmid Miyad Add Python to your thread tags?
29th Apr 2020, 10:14 AM
Ipang