Python graphical user interface test In my programming class I am learning how to make graphical user interfaces, and so I decided to make one.

import tkinter as t
from random import choice


COLORS = ["white", "black", "red", "green", "blue", "cyan", "yellow", "magenta"]


def button_clicked():
    display_area.config(text = "You clicked the button!")
    screen.itemconfig(epilepsy_man, fill = choice(COLORS))

def epilepsy_man_movment(event):
    key = event.keysym
    if key == "Right":
        screen.move(epilepsy_man, 10, 0)
        screen.itemconfig(epilepsy_man, fill = choice(COLORS))
    elif key == "Left":
        screen.move(epilepsy_man, -10, 0)
        screen.itemconfig(epilepsy_man, fill = choice(COLORS))
    elif key == "Up":
        screen.move(epilepsy_man, 0, -10)
        screen.itemconfig(epilepsy_man, fill = choice(COLORS))
    elif key == "Down":
        screen.move(epilepsy_man, 0, 10)
        screen.itemconfig(epilepsy_man, fill = choice(COLORS))


window = t.Tk()
window.title("Your reading this right now. Please stop.")

button = t.Button(window, text = "Can you click me?", command = button_clicked)
button.pack()

display_area = t.Label(window, text = "Go on! Click the button!")
display_area.pack()

screen = t.Canvas(window, width = 500, height = 500)
screen.pack()
epilepsy_man = screen.create_oval(200, 200, 300, 300, fill = choice(COLORS))
screen.bind_all("&lt;Key&gt;", epilepsy_man_movment)

window.mainloop()



Please note "epilepsy". If you run this there will be flashing images.

I want to know if I properly followed any conventions, as well as if there is any better way of doing what I have done.

What this program does is make a button that changes the color of the circle and the text on a textbox, as well as creating said textbox and said circle which moves with the arrow keys and changes with each key press.
You misspelled "movement" as "movment".

Typically (as per PEP-8), indentations are specified by one hard tab or four spaces, so you're good in that respect.

To be sure about formatting you can read up on PEP-8.

I am also wondering about _man. This doesn't seem to be displaying a man (but I haven't run it) so why name it that way? Also, epilepsy doesn't seem like a suitable name. Perhaps colored_box would be more formal?