Question: this code is not working and i need to replace that word canvas to another word need help as soon as possible python ! 1
1 canvas1 = tk.Canvas (root, width = 400, height = 300) 2 canvas1.pack() 3 entry1 = tk. Entry (root) 4 canvas1.create_window( 200, 140, window=entry1) 5 def getSquareRoot (): x1 = entry1.get() 8 label1 = tk. Label(root, text= float(x1)**0.5) 9 canvas1.create_window( 200, 230, window=label1) 10 button1 = tk.Button(text='Get the Square Root', command=getSquareRoot) 11 canvas1.create_window( 200, 180, window=button1) 12 import tkinter as tk 13 root= tk.Tk() 16 canvas1 = tk.Canvas (root, width = 400, height = 300) canvas1.pack() 18 19 entry1 = tk.Entry (root) 20 canvas1.create_window (200, 140, window=entry1) 22 def getSquareRoot (): 23 x1 = entry1.get() 24 25 label1 = tk. Label(root, text= float(x1)**0.5) 26 canvas1.create_window (200, 230, window=labell) 27 28 button1 = tk.Button(text='Get the Square Root', command=getSquareRoot) 29 canvas1.create_window (200, 180, window=button1) 30 31 root.mainloop()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
