How to tell whether a relation is reflexive, transitive or symmetric in PYTHON? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to tell whether a relation is reflexive, transitive or symmetric in PYTHON?

I want to write a code in python that would take a set as input and on the basis of the relation entered by the user on that set, it would output whether that relation is reflexive, symmetric or transitive...

7th May 2019, 4:33 AM
Ankit Mishra
Ankit Mishra - avatar
2 Answers
+ 1
The function could look something like this https://code.sololearn.com/cULMNkWJgrZh/?ref=app
11th May 2019, 1:58 PM
Paul
0
We did it!!!!!
15th May 2019, 6:20 AM
Akmis
Akmis - avatar