+ 3

Why is the output 30?

def f(m,n): return m|n print (f(10,20)) Output 30 Thank you for your help!

3rd Mar 2018, 9:05 PM
Yohann
3 Answers
+ 13
Because you using bitwise* OR 10100 01010 -> 11110 Try to replace it to "||"
3rd Mar 2018, 9:06 PM
Vladislav Tikhiy (SILENT)
Vladislav Tikhiy (SILENT) - avatar
+ 9
ur welcome
3rd Mar 2018, 10:06 PM
Vladislav Tikhiy (SILENT)
Vladislav Tikhiy (SILENT) - avatar
+ 2
Thank you šŸ˜€
3rd Mar 2018, 10:06 PM
Yohann