Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need help completing my code in python from graphics import * def main(): win = GraphWin(math,300,300) win.setCoords(0,0 , 10, 10) win.setBackground(color_rgb(204,236,255)) xtext = Text(Point(3,8),'X')
i need help completing my code in python from graphics import * def main(): win = GraphWin("math",300,300) win.setCoords(0,0 , 10, 10) win.setBackground(color_rgb(204,236,255)) xtext = Text(Point(3,8),'X') xtext.setSize(18) xtext.draw(win) ytext = Text(Point(3,7),'Y') ytext.setSize(18) ytext.draw(win) ftext = Text(Point(3,6),'f(x,y)') ftext.setSize(18) ftext.draw(win) color=Rectangle(Point(3,1),Point(7,3)) color.setFill(color_rgb(0,191,255)) color.draw(win) text = Text(Point(5,2),"OK") text.draw(win) outputtext = Text(Point(5,4), "x + y = 3") outputtext.setSize(18) outputtext.draw(win) #get inputs box1 = Entry(Point(6,8), 10) box1.setFill("white") box1.setText("1") box2 = Entry(Point(6,7), 10) box2.setFill("white") box2.setText('2') box3 = Entry(Point(6,6), 10) box3.setText("x + y") box3.setFill("white") box1.draw(win) box2.draw(win) box3.draw(win) #exports inputs for j in range(0): Xinput= input(box1) Yinput= input(box2) Finput= input(box3) for i in range(0): if True: xnum = float(box1.getText()) ynum = float(box2.getText()) fnum = box3.getText() elif True: z = eval(fnum) outputtext.setText(z) win.getMouse() main()Paragrap Styles (b) (20 poirts) Develop a Python program (called math_gui.py that allows a user to compute simple functions of two variables (x and y) in a graphical user interface. Upon completion, your program should look like X 1000 f(x,y) y10 xy-3 xIy-10 y -210.0 OK OK default state the user can edit the inputs! The program has already been started for you. Ifyou run the initial code, the interface is clearly missing several elements (see below) f(x.y) Paragrap Styles (b) (20 poirts) Develop a Python program (called math_gui.py that allows a user to compute simple functions of two variables (x and y) in a graphical user interface. Upon completion, your program should look like X 1000 f(x,y) y10 xy-3 xIy-10 y -210.0 OK OK default state the user can edit the inputs! The program has already been started for you. Ifyou run the initial code, the interface is clearly missing several elements (see below) f(x.y)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started