Logical operators

i tried print(5 or 1) but it should give 1 but the output coming is 5. why?

Hi @sakshiten_3e35cd3d9273709e
There is a rule in Boolean algebra that states:

0 or (any number) = (Number)
1 or (any number) = 1
0 and (any number) = 0
1 and (any number) = (Number)

Hope this might helps :slight_smile: