Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions