# your code goes here
from tkinter import *
class Appl(Frame):
    def __init__(self, master):
        super(Appl, self).__init__(master)
        self.grid()
        self.create_widgets()
    def create_widgets(self):
        self.one_lbl = Label(self, text = "Делимое")
        self.one_lbl.grid(row = 0, column = 0, sticky = W)
        self.two_lbl = Label(self, text = "Делитель")
        self.two_lbl.grid(row = 0, column = 1, sticky = W)
        self.doe_ent = Entry(self)
        self.doe_ent.grid(row = 1, column = 0, sticky = W)
        self.dtel_ent = Entry(self)
        self.dtel_ent.grid(row = 1, column = 1, sticky = W)
        self.bttn = Button(self, text = "Result", command = self.logica)
        self.bttn.grid(row = 2, column = 0, sticky = W)
        self.text = Text(self, width = 100, height = 50, wrap = WORD)
        self.text.grid(row = 3, column = 0, columnspan = 3, sticky = W)
    def logica(self):
        atr_one = self.doe_ent.get()
        atr_two = self.dtel_ent.get()
        iterat = 0
        PER = ("\n")
        self.text.delete(0.0, END)
        while atr_one != atr_two:
            iterat += 1
            self.text.insert(0.0, ("ITR=", iterat, atr_one, atr_two))
            if atr_one > atr_two:
                atr_one = atr_one % atr_two
            else:
                atr_two = atr_two % atr_one