Python Forum
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
' | ' Operator and 'OR'
#3
Thx for replying!
Why its incomplete? If 'n % x' is not ==0 then returns 1 which is equal to True, otherwise its False, works for me in Python3.

Im still trying to figure out how exactly this 'binary OR' solved this, 'n % x == 0' should return value of 'True' or 'False' so its like '0001' or '0000' in binary I guess, and so the 'binary OR' copies one True to the both arguments if one is True, right? Feels like im missing something, but maybe its just that.
Reply


Messages In This Thread
' | ' Operator and 'OR' - by blackknite - Jan-10-2019, 01:10 AM
RE: ' | ' Operator and 'OR' - by stullis - Jan-10-2019, 02:24 AM
RE: ' | ' Operator and 'OR' - by blackknite - Jan-10-2019, 04:47 PM
RE: ' | ' Operator and 'OR' - by stullis - Jan-10-2019, 06:28 PM
RE: ' | ' Operator and 'OR' - by nilamo - Jan-10-2019, 06:40 PM
RE: ' | ' Operator and 'OR' - by Gribouillis - Jan-10-2019, 06:54 PM
RE: ' | ' Operator and 'OR' - by nilamo - Jan-10-2019, 07:08 PM
RE: ' | ' Operator and 'OR' - by blackknite - Jan-10-2019, 11:08 PM
RE: ' | ' Operator and 'OR' - by stullis - Jan-11-2019, 01:23 AM
RE: ' | ' Operator and 'OR' - by nilamo - Jan-11-2019, 05:51 AM
RE: ' | ' Operator and 'OR' - by blackknite - Jan-11-2019, 09:32 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020