Skip to main content
Post Closed as "Duplicate" by emanresu A, lyxal, caird coinheringaahin gMod
Fix tag link
Source Link
Peter Taylor
  • 43.1k
  • 8
  • 55
  • 117

I couldn't find any consensus on this on meta for a while, and this seems to be particularly helpful when answering challenges. Should swapping truthy and falsy be allowed by default, when answering such challenges, unless overridden?

For example, when testing primality, one could output a falsy value for primes and a truthy value for non-primes. Is this allowed by default?

I couldn't find any consensus on this on meta for a while, and this seems to be particularly helpful when answering . Should swapping truthy and falsy be allowed by default, when answering such challenges, unless overridden?

For example, when testing primality, one could output a falsy value for primes and a truthy value for non-primes. Is this allowed by default?

I couldn't find any consensus on this on meta for a while, and this seems to be particularly helpful when answering challenges. Should swapping truthy and falsy be allowed by default, when answering such challenges, unless overridden?

For example, when testing primality, one could output a falsy value for primes and a truthy value for non-primes. Is this allowed by default?

deleted 30 characters in body
Source Link
Mr. Xcoder
  • 42.5k
  • 21
  • 42

I couldn't find any consensus on this on meta for a while, and this seems to be particularly helpful when answering . Should swapping truthy and falsy be allowed by default, when answering such challenges, or should we let the OP of the challenge decideunless overridden?

For example, when testing primality, one could output a falsy value for primes and a truthy value for non-primes. Is this allowed by default?

I couldn't find any consensus on this on meta for a while, and this seems to be particularly helpful when answering . Should swapping truthy and falsy be allowed by default, when answering such challenges, or should we let the OP of the challenge decide?

For example, when testing primality, one could output a falsy value for primes and a truthy value for non-primes. Is this allowed by default?

I couldn't find any consensus on this on meta for a while, and this seems to be particularly helpful when answering . Should swapping truthy and falsy be allowed by default, when answering such challenges, unless overridden?

For example, when testing primality, one could output a falsy value for primes and a truthy value for non-primes. Is this allowed by default?

Source Link
Mr. Xcoder
  • 42.5k
  • 21
  • 42

Is (consistently) swapping truthy / falsy values allowed in decision-problems?

I couldn't find any consensus on this on meta for a while, and this seems to be particularly helpful when answering . Should swapping truthy and falsy be allowed by default, when answering such challenges, or should we let the OP of the challenge decide?

For example, when testing primality, one could output a falsy value for primes and a truthy value for non-primes. Is this allowed by default?