From 616cc613901b6dadf8e1e5996548bbb99c0031a4 Mon Sep 17 00:00:00 2001 From: Luke Weiler Date: Wed, 21 Oct 2020 14:16:11 -0400 Subject: [PATCH] Update set_operation.py --- mathgenerator/funcs/set_operation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mathgenerator/funcs/set_operation.py b/mathgenerator/funcs/set_operation.py index 4f0a27a..8d6db07 100644 --- a/mathgenerator/funcs/set_operation.py +++ b/mathgenerator/funcs/set_operation.py @@ -15,3 +15,7 @@ def set_operation(minval=3, maxval=7, n_a=4, n_b=5): problem = "Given the two sets a=" + str(a) + " ,b=" + str(b) + ".Find the Union,intersection,a-b,b-a and symmetric difference" solution = "Union is " + str(a.union(b)) + ",Intersection is " + str(a.intersection(b)) + ", a-b is " + str(a.difference(b)) + ",b-a is " + str(b.difference(a)) + ", Symmetric difference is " + str(a.symmetric_difference(b)) return problem, solution + +setoperations = Generator("Union,Intersection,Difference of Two Sets", 93, + "Union,intersection,difference", + "aUb,a^b,a-b,b-a,", set_operation)