Ask Your Question

mrh4578's profile - activity

2020-06-19 22:24:45 +0100 asked a question Can you help me write an algorithm that gives me the number of k subsets of a n member set? like {1,2,3}--->two subset---->[{1,2},{1,3},{2,3}]

Can you help me write an algorithm that gives me the number of k subsets of a n member set? like {1,2,3}---two subset---->[{1,2},{1,3},{2,3}]

2020-06-19 22:22:49 +0100 commented question why is it wrong

Can you help me write an algorithm that gives me the number of k subsets of a n member set? like {1,2,3}---two subset---->[{1,2},{1,3},{2,3}]

2020-06-14 16:14:28 +0100 commented question why is it wrong

error again

2020-05-30 15:10:14 +0100 asked a question why is it wrong

The code:

def get_power_set(s):
          power_set=[[]]
          for elem in s:
            for sub_set in power_set:
              power_set=set(power_set+set[list(sub_set)+[elem]])
          return power_set
2020-05-30 02:08:07 +0100 asked a question Please help me write a function that receives a set and then gives all its subsets

Please help me write a function that receives a set and then gives all its subsets

2020-05-30 02:08:07 +0100 asked a question Please help me write a function that receives a set and then gives all its subsets

Please help me write a function that receives a set and then gives all its subsets