E
E
Emil Timerbaev2021-07-12 16:36:51
Python
Emil Timerbaev, 2021-07-12 16:36:51

Are there elements of ternary logic in python?

Are there elements of ternary logic in python.
And also is there a logical "not defined"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2021-07-12
@longclaps

Do you know the children's game "rock, paper, scissors"? If you're not sure, I'll remind you of the rules. Two people play, they choose the moment and at the same time, in concert, shout out one of these three words. If their choices match, i.e. the word is the same, it doesn't count, it's a draw. But if the words are different, everything becomes more interesting. Stone defeats scissors (mnemonic rule - stone breaks scissors), scissors defeats paper (as if cutting it), paper defeats stone (wraps it). The word that is not spoken is assigned the logical "not defined" - for example, in the fight of stone and scissors, paper is not defined.
As you can see, everything is simple, even a python was not needed.
Do you want to know more? Come, let's play "rock, paper, scissors" on schelbany.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question