Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: Implement Gui of the following given code the code run in gui and attach output of gui code. Language python. import math def fun_Minmax(cd,

Question:

Implement Gui of the following given code the code run in gui and attach output of gui code.

Language python.

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: Code this simple python code in gui of python. 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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

Students also viewed these Databases questions

Question

What is the relationship between FIX and FIXML?

Answered: 1 week ago

Question

Know the three main dimensions of the service environment.

Answered: 1 week ago