Question: COURSE: PYTHON Question: Make the python code in GUI CODE: import math def fun_Minmax(cd, node, maxt, scr, td): if(cd==td): return scr[node] if(maxt): return max(fun_Minmax(cd+1, node*2,

COURSE: PYTHON

Question:

Make the python code in GUI

CODE:

import math def fun_Minmax(cd, node, maxt, scr, td): if(cd==td): return scr[node] if(maxt): return max(fun_Minmax(cd+1, node*2, False, scr, td), fun_Minmax(cd+1, node*2+1, False, scr, td)) else: return min(fun_Minmax(cd+1, node*2, True, scr, td), fun_Minmax(cd+1, node*2+1, True, scr, td)) scr=[] x=int(input("Enter total number of leaf node=")) for i in range(x): y=int(input("Enter leaf value:")) scr.append(y) td=math.log(len(scr),2) cd=int(input("Enter current depth value:")) nodev=int(input("Enter node value:")) maxt=True print("The answer is:",end=" ") answer=fun_Minmax(cd, nodev, maxt, scr, td) print(answer)

NOTE: Please make the python code in GUI and attach output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!