user interface - (python GUI)I think This is an efficient code, but there has a grammatical error -


i wrote program moves hexagon shape number of times.
there error on line 8, i'm asking if there errors on other line,

import time tkinter import* tk = tk() canvas=canvas(tk, width=1000, height=1000, background="black") canvas.pack() canvas.create_polygon(300,200,300,250,340,225,fill="yellow")  def tkuptake(canvasmove(x),canvasmove(y),canvasmove(z)): x in range(0, 20):     canvas.move(canvasmove(x),canvasmove(y),canvasmove(z))     tk.update()     time.sleep(0.03)  k = int(input("input value")) q in range(0,k):        tkuptake(1,5,5)    tkuptake(1,5,5)    tkuptake(1,-5,5)    tkuptake(1,-5,0)    tkuptake(0,-5,-5)    tkuptake(0,5,-5) 

line number 8 has indentation error, fix using following

def tkuptake(canvasmove(x),canvasmove(y),canvasmove(z)):     x in range(0, 20):         canvas.move(canvasmove(x),canvasmove(y),canvasmove(z))         tk.update()         time.sleep(0.03) 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -