Re: Why Python When There Is Perl?

Liste des GroupesRevenir à col advocacy 
Sujet : Re: Why Python When There Is Perl?
De : Physfitfreak (at) *nospam* gmail.com (Physfitfreak)
Groupes : comp.os.linux.advocacy
Date : 24. Mar 2024, 00:11:00
Autres entêtes
Message-ID : <utnk1l$1o32m$3@solani.org>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
On 3/23/2024 5:09 AM, Farley Flud wrote:
A is all prime numbers <= 100
 B is all odd numbers <= 100
 We have 4 possibilities:
 A => B: true
A number is prime implies it is odd.  Another, more proper,
way to state this is that if a number is in set A (prime)
then it is also in set B.
 ~A => B: true
If a number is not prime then it is odd.  The set of ~A
includes all the even numbers as well as all the odd numbers
in B.  This statement actually says that a number being not
prime as well as odd is a possibility because ~A includes B.
 A => ~B: false
Obviously, if a number is prime it cannot be not odd, that is,
if a number is in set A (prime) it cannot be in set ~B (even
numbers).
 ~A => ~B: true
Again, if a number is not in set A, the evens and all non-prime
odds, then it may be also not in set B, the non-prime odds.
The second and fourth cases should both be false, not true.
In the second case (~A => B), non-prime isn't necessarily odd, and therefore ~A does _not_ imply B, so result is false, not true.
In the fourth case (~A => ~B), non-prime isn't necessarily even, and therefore ~A doesn't imply ~B, so result is false, not true.
And looking at the four results, one can see that we have three false result and one true result (first case).
--
This email has been checked for viruses by Avast antivirus software.
www.avast.com

Date Sujet#  Auteur
5 Oct 24 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal