I have a fully functional code with three functions each of which returns outputs of it own. My task is to create one function which can call all the other functions and return the outputs of all the functions. how do I do that? My code is as follows:
def func(x, y):
return x * x + y * y, x * y
def generate_data(size):
nx = 5
mx = 0.5
mux, sigmax = nx, mx/3
ny = 3
my = 0.9
muy, sigmay = ny, my/3
result1=[]
result2=[]
for i in range(size):
result = func(random.gauss(mux, sigmax), random.gauss(muy, sigmay))
result1.append(result[0])
result2.append(result[1])
return result1, result2
def analysis(ls):
avg = np.mean(ls)
std = np.std(ls)
pre = 3 * std
return avg, std, pre
say, for eg: I need to create a function
def My_func()
and this function should have the other functions and returns its outputs