Italian verb conjugator

This is a translator app I made in python which takes regular Infinitive Italian verbs and conjugates them to a person and tense. It uses a large set of Italian verb rules to conjugate the verbs and the google translate API to translate the verbs to English, all hidden behind a sleek GUI.

(11th June 2022)

Note: It does not work without a physical keyboard and the google API does not seem to be working with Replit. Use your own python interpreter with the code below to use all features.

I also made a version with Chat GPT API as well that would give you conjugated verb alongside the logic-based solution.

This is the source code for the project. Feel free to copy it. and run it in your own python interpreter for a better experience. Click to download the python file. Sorry I can't share the exe file with you, google drive really wasn't happy hosting it :(

from tkinter import *

from googletrans import Translator

translator = Translator()

window = Tk()

window.title("Italian regular infinative verb Translator")

reason="This just here as a place holder, I am working to to add the reason :)"

def dbn():

    try:

      bn.destroy()

    except:

      pass

def dlab2():

    try:

      lab2.destroy();lab2.destroy();lab2.destroy();lab2.destroy();lab2.destroy();print("lab2 is dead meat")

      print("comfermation")

    except:

      print("coulnt find lab2")

      pass

def dTense():

    try:

      Presentbt.destroy();Futurebt.destroy();Imperfectbt.destroy();Perfectbt.destroy();Conditionalbt.destroy()

    except:

      pass

def dPerson():

    try:

      Ibt.destroy();HeShebt.destroy();Youbt.destroy();Webt.destroy();Youpbt.destroy();Theybt.destroy();lab3.destroy()

    except:

      pass

def dendRestart():

    try:

      end.destroy();Restart.destroy()

    except:

      pass

def dhaveambt():

    try:

      havebt.destroy();ambt.destroy();amhave.destroy()

    except:

      pass


def restart():

  Restart.configure(bg="#7eff70")

  global lab1,labone,Translate1

  for widget in window.winfo_children():

    widget.destroy()

  labone = Label(window, text="Back for more! Enter the infinitve of the regular verb below. \n e.g sapere, sentire, parlare, scrivere, finire")

  labone.grid(column=1, row=0,columnspan = 6)

  lab1 = Entry(window,width=20)

  lab1.grid(column=1, row=1,columnspan = 6)

  Translate1 = Button(window, text ="Click to proceed",command= clicked)

  Translate1.grid(column=1, row=2,columnspan = 6)

 

def Workitout(Person):

  global result,reason,end,Restart,ambt,havebt,amhave,oldresult

  print(Person+"plase print")

  if Tense=="present":

    print("present")

    if Person=="i":

      print("i")

      result=(infinitive[:-3])+"o"

      reason="In the present tense, if the person is \"I\", you take of the last 3 letters and add \"o\"."

      print(result)

    elif Person=="you":

      print("you")

      result=(infinitive[:-3])+"i"

      reason="In the present tense, if the person is \"you\", you take of the last 3 letters and add \"i\"."

      print(result)

    elif Person=="he" or Person=="she":

      print("he")

      result=(infinitive[:-2])

      print(result)

      if (result[-1:])=="i":

        result=(result[:-1]+"e")

        reason="In the present tense, if the person is \"he\" or \"she\", you take of the last 3 letters. Then add an \"a\" if its a \"are\" verb,\"e\" if its a \"ere\" verb and \"e\" for a \"ire\" verb."

        print(result)

      else:

        reason="In the present tense, if the person is \"he\" or \"she\", you take of the last 3 letters. Then add \"a\" if its a \"are\" verb,\"e\" if its a \"ere\" verb and \"e\" for a \"ire\" verb."

        print(result)

    elif Person==("we"):

      print("we")

      result=(infinitive[:-3])+"iamo"

      reason="In the present tense, if the person is \"we\", you take of the last 3 letters and add \"iamo\"."

      print(result)

    elif Person==("you(p)"):

      print("you(p)")

      result=(infinitive[:-2])+"te"

      reason="In the present tense, if the person is \"you(p)\", you take of the last 3 letters. Then add \"ate\" if its a \"are\" verb,\"ete\" if its a \"ere\" verb and \"ite\" for a \"ire\" verb."

      print(result)

    elif Person==("they"):

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3]+"ano")

        reason="In the present tense, if the person is \"they\", you take of the last 3 letters. Then add \"ano\" if its a \"are\" verb,\"ono\" if its a \"ere\" verb and \"ono\" for a \"ire\" verb."

        print(result)

      else:

        result=(infinitive[:-3]+"ono")

        reason="In the present tense, if the person is \"they\", you take of the last 3 letters. Then add \"ano\" if its a \"are\" verb,\"ono\" if its a \"ere\" verb and \"ono\" for a \"ire\" verb."

        print(result)

        print(reason)

    else:

      print("you entered the person in icorectly")

  #future tense

  elif Tense=="future":

    print("future")

    if Person=="i":

      print("i")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"eró"

        reason="In the future tense, if the person is \"I\" , you take of the last 3 letters. Then add \"erὸ\" if its a \"are\" verb,\"erὸ\" if its a \"ere\" verb and \"irὸ\" for a \"ire\" verb."

        print(reason)

      else:

        result=(infinitive[:-1])+"ó"

        reason="In the future tense, if the person is \"I\" , you take of the last 3 letters. Then add \"erὸ\" if its a \"are\" verb,\"erὸ\" if its a \"ere\" verb and \"irὸ\" for a \"ire\" verb."

        print(result)

    elif Person=="you":

      print("you")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"erai"

        reason="In the future tense, if the person is \"you\" , you take of the last 3 letters. Then add \"erai\" if its a \"are\" verb,\"erai\" if its a \"ere\" verb and \"irai\" for a \"ire\" verb."

      else:

        result=(infinitive[:-1])+"ai"

        reason="In the future tense, if the person is \"you\" , you take of the last 3 letters. Then add \"erai\" if its a \"are\" verb,\"erai\" if its a \"ere\" verb and \"irai\" for a \"ire\" verb."

      print(result)

    elif Person=="he" or Person=="she":

      print("he/she")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"erà"

        reason="In the future tense, if the person is \"he\" or\"she\", you take of the last 3 letters. Then add \"erá\" if its a \"are\" verb,\"erai\" if its a \"ere\" verb and \"irai\" for a \"ire\" verb."

      else:

        result=(infinitive[:-1])+"à"

        reason="In the future tense, if the person is \"he\" or\"she\", you take of the last 3 letters. Then add \"erá\" if its a \"are\" verb,\"erai\" if its a \"ere\" verb and \"irai\" for a \"ire\" verb."

        print(result)

    elif Person==("we"):

      print("we")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"eremo"

        reason="In the future tense, if the person is \"we\", you take of the last 3 letters. Then add \"eremo\" if its a \"are\" verb,\"eremo\" if its a \"ere\" verb and \"iremo\" for a \"ire\" verb."

      else:

        result=(infinitive[:-1])+"emo"

        reason="In the future tense, if the person is \"we\", you take of the last 3 letters. Then add \"eremo\" if its a \"are\" verb,\"eremo\" if its a \"ere\" verb and \"iremo\" for a \"ire\" verb."

        print(result)

    elif Person==("you(p)"):

      print("you(p)")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"erete"

        reason="In the future tense, if the person is \"you(p)\", you take of the last 3 letters. Then add \"erete\" if its a \"are\" verb,\"erete\" if its a \"ere\" verb and \"irete\" for a \"ire\" verb."

      else:

        result=(infinitive[:-1])+"ete"

        reason="In the future tense, if the person is \"you(p)\", you take of the last 3 letters. Then add \"erete\" if its a \"are\" verb,\"erete\" if its a \"ere\" verb and \"irete\" for a \"ire\" verb."

      print(result)

    elif Person==("they"):

      print("they")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"eranno"

        reason="In the future tense, if the person is \"they\", you take of the last 3 letters. Then add \"eranno\" if its a \"are\" verb,\"eranno\" if its a \"ere\" verb and \"iranno\" for a \"ire\" verb."

      else:

        result=(infinitive[:-1])+"anno"

        reason="In the future tense, if the person is \"they\", you take of the last 3 letters. Then add \"eranno\" if its a \"are\" verb,\"eranno\" if its a \"ere\" verb and \"iranno\" for a \"ire\" verb."

      print(result)

    else:

      print("you entered the person in icorectly")

 

  #imperect tense

  elif Tense=="imperfect":

    print("imperfect")

    if Person=="i":

      print("i")

      result=(infinitive[:-2])+"vo"

      reason="In the imperfect tense, if the person is \"I\", you take of the last 2 letters and add \"vo\"."

      print(result)

    elif Person=="you":

      print("you")

      result=(infinitive[:-2])+"vi"

      reason="In the imperfect tense, if the person is \"you\", you take of the last 2 letters and add \"vi\"."

      print(result)

    elif Person=="he"or Person=="she":

      print("he/she")

      result=(infinitive[:-2])+"va"

      reason="In the imperfect tense, if the person is \"he\" or \"she\", you take of the last 2 letters and add \"va\"."

      print(result)

    elif Person==("we"):

      print("we")

      result=(infinitive[:-2])+"vamo"

      reason="In the imperfect tense, if the person is \"we\", you take of the last 2 letters and add \"vamo\"."

      print(result)

    elif Person==("you(p)"):

      print("you(p)")

      result=(infinitive[:-2])+"ate"

      reason="In the imperfect tense, if the person is \"you(p)\", you take of the last 2 letters and add \"vate\"."

      print(result)

    elif Person==("they"):

      print("they")

      result=(infinitive[:-2])+"vano"

      reason="In the imperfect tense, if the person is \"I\", you take of the last 2 letters and add \"vano\"."

      print(result)

    else:

      print("you entered the person in icorectly")

 

  #perfect

  elif Tense=="perfect":

    print("perfect")

    if (infinitive[-3:-2])=="e":

      result=(infinitive[:-3])+"uto"

    else:

      result=(infinitive[:-2])+"to"

    oldresult=result  

    def blankambthavebt():

      ambt.configure(bg=orig_color)

      havebt.configure(bg=orig_color)

    def am():

      blankambthavebt()

      ambt.configure(bg="#7eff70")

      global result,oldresult,end,Restart

      result=oldresult

      have_am="am"

      if Person=="i":

        print("i")

        result="sono "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"andato\" means \"left.\"\nThen you need to add \"I am\" infront, which is \"sono.\""

      elif Person=="you":

        print("you")

        result="sei "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"andato\" means \"left.\"\nThen you need to add \"you are\" infront, which is \"sei.\""

      elif Person=="he" or Person=="she":

        print("he or she")

        result="e' "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"andato\" means \"left.\"\nThen you need to add \"he/she is\" infront, which is \"e'.\""

      elif Person==("we"):

        print("we")

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"andato\" means \"left.\"\nThen you need to add \"we are\" infront, which is \"siamo.\""

        result="siamo "+result

        print(result)

      elif Person==("you(p)"):

        print("you(p)")

        result="siete "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"andato\" means \"left.\"\nThen you need to add \"You are\" infront, which is \"siete.\""

      elif Person==("they"):

        if (infinitive[-3:-2])=="a":

          result="sono "+result

          print(result)

          reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"andato\" means \"left.\"\nThen you need to add \"they are\" infront, which is \"sono.\""

      else:

        print("you entered the person in icorectly")

      try:

          end.destroy();Restart.destroy()

      except:

          print("could not delete becaseu nothing there")

      end = Label(window, text="RESULT: The infinative "+infinitive+" in the "+Tense+" tense and the "+Person+" form is conjugated to make "+result+". \n REASON: "+reason)

      end.grid(column=1, row=10,columnspan = 6)


      Restart = Button(window, text ="Click before entering a new verb to restart program",command= restart)

      Restart.grid(column=1, row=11,columnspan = 6)

       

    def have():

      blankambthavebt()

      havebt.configure(bg="#7eff70")

      global result,end,Restart,oldresult

      result=oldresult

      have_am="have"

      if Person=="i":

        print("i")

        result="ho "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"parlato\" means \"spoken.\"\nThen you need to add \"I have\" infront, which is \"ho.\""

      elif Person=="you":

        print("you")

        result="hai "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"parlato\" means \"spoken.\"\nThen you need to add \"You have\" infront, which is \"hai.\""

      elif Person=="he" or Person=="she":

        print("he or she")

        result="ha "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"parlato\" means \"spoken.\"\nThen you need to add \"he/she have\" infront, which is \"ha.\""

      elif Person==("we"):

        print("we")

        result="abbiamo "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"parlato\" means \"spoken.\"\nThen you need to add \"we have\" infront, which is \"abbiamo\""

      elif Person==("you(p)"):

        print("you(p)")

        result="avete "+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"parlato\" means \"spoken.\"\nThen you need to add \"you have\" infront, which is \"avete.\""

      elif Person==("they"):

        result="hanno"+result

        print(result)

        reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"parlato\" means \"spoken.\"\nThen you need to add \"they have\" ifront, which is \"hanno.\""

      else:

        print("you entered the person in icorectly")

      try:

        end.destroy();Restart.destroy()

      except:

        print("could not delete becaseu nothing there")

      end = Label(window, text="RESULT: The infinative "+infinitive+" in the "+Tense+" Tense and the "+Person+" form is conjugated to make "+result+". \n REASON: "+reason)

      end.grid(column=1, row=10,columnspan = 6)

      Restart = Button(window, text ="Click before entering a new verb to restart program",command= restart)

      Restart.grid(column=1, row=11,columnspan = 6)

    amhave = Label(window, text="Does your verb need \"have\" or \"am\" infront of it. eg. I have eaten/I ate or i am going/i went ")

    amhave.grid(column=1, row=8,columnspan = 6)

    ambt = Button(window, text ="am(essere)",command= am)

    ambt.grid(column=1, row=9)

    havebt = Button(window, text ="have(avere)",command= have)

    havebt.grid(column=2, row=9)

    bob=4

    while(expression):

        statement(s)

        print("the error is not a bad thing, it is intetional")

  elif Tense=="conditional":

    print("conditional")

    if Person=="i":

      print("i")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"erei"

      else:

        result=(infinitive[:-1])+"ei"

      print(result)

    elif Person=="you":

      print("you")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"eresti"

      else:

        result=(infinitive[:-1])+"esti"

      print(result)

      reason="In the perfect tense, you take of the last 3 letters. Then add \"ato\" if its a \"are\" verb,\"uto\" if its a \"ere\" verb and \"ito\" for a \"ire\" verb. This is now the past participle, for example \"andato\" means \"left.\"\nThen you need to add \"he/she is\" infront, which is \"e'.\""

    elif Person=="he" or Person=="she":

      print("he/she")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"erebbe"

      else:

        result=(infinitive[:-1])+"ebbe"

      print(result)

    elif Person==("we"):

      print("we")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"eremmo"

      else:

        result=(infinitive[:-1])+"emmo"

      print(result)

    elif Person==("you(p)"):

      print("you(p)")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"ereste"

      else:

        result=(infinitive[:-1])+"este"

      print(result)

    elif Person==("they"):

      print("they")

      if (infinitive[-3:-2])=="a":

        result=(infinitive[:-3])+"erebbero"

      else:

        result=(infinitive[:-1])+"ebbero"

      print(result)

    else:

      print("you entered the person in icorectly")

  else:

    print("you entered the tense wroge")

  try:

    end.destroy();Restart.destroy()

  except:

    print("could not delete becaseu nothing there")

  end = Label(window, text="RESULT: The infinative "+infinitive+" in the "+Tense+" Tense and the "+Person+" form is conjugated to make "+result+". \n REASON: "+reason)

  end.grid(column=1, row=8,columnspan = 6)

  Restart = Button(window, text ="Click before entering a new verb to restart program",command= restart)

  Restart.grid(column=1, row=9,columnspan = 6)

 

labone = Label(window, text="Enter the infinitve of the regular verb below.  \n e.g sapere, sentire, parlare, scrivere, finire")

labone.grid(column=1, row=0,columnspan = 6)


lab1 = Entry(window,width=20)

lab1.grid(column=1, row=1,columnspan = 6)


def doperson():

  print("do person called up")

  global lab3,Person,Ibt,Youbt,HeShebt,Webt,Youpbt,Theybt,Restart

  lab3 = Label(window, text="Click on the person you want to be doing the verb.")

  lab3.grid(column=1, row=6,columnspan = 6)

  def Blankbtdoperson():

    Ibt.configure(bg=orig_color)

    Youbt.configure(bg=orig_color)

    HeShebt.configure(bg=orig_color)

    Webt.configure(bg=orig_color)

    Youpbt.configure(bg=orig_color)

    Theybt.configure(bg=orig_color)

  def I():

    Blankbtdoperson()

    Ibt.configure(bg="#7eff70")

    dendRestart()

    dhaveambt()

    global Persone

    Person="i"

    Workitout(Person)

  def You():

    Blankbtdoperson()

    Youbt.configure(bg="#7eff70")

    dendRestart()

    dhaveambt()

    global Person

    Person="you"

    Workitout(Person)

  def HeShe():

    Blankbtdoperson()

    HeShebt.configure(bg="#7eff70")

    dendRestart()

    dhaveambt()

    global Person

    Person="he"

    Workitout(Person)

  def We():

    Blankbtdoperson()

    Webt.configure(bg="#7eff70")

    dendRestart()

    dhaveambt()

    global Person

    Person="we"

    Workitout(Person)

  def Youp():

    Blankbtdoperson()

    Youpbt.configure(bg="#7eff70")

    dendRestart()

    dhaveambt()

    global Person

    Person="you(p)"

    Workitout(Person)

  def They():

    Blankbtdoperson()

    Theybt.configure(bg="#7eff70")

    dendRestart()

    dhaveambt()

    global Person

    Person="they"

    Workitout(Person)


  Ibt = Button(window, text ="I",command= I)

  Ibt.grid(column=1, row=7)

  Youbt = Button(window, text ="You",command= You)

  Youbt.grid(column=2, row=7)

  HeShebt = Button(window, text ="He/She",command= HeShe)

  HeShebt.grid(column=3, row=7)

  Webt = Button(window, text ="We",command= We)

  Webt.grid(column=4, row=7)

  Youpbt = Button(window, text ="You (plural)",command= Youp)

  Youpbt.grid(column=5, row=7)

  Theybt = Button(window, text ="They",command= They)

  Theybt.grid(column=6, row=7)

 

def clicked():

  Translate1.configure(bg="#7eff70")

  global infinitive,bn,lab2,Presentbt,Futurebt,Imperfectbt,Perfectbt,Conditionalbt,Restart

  infinitive = lab1.get()

  dbn()

  dlab2()

  print("lab2 deleted")

  dTense()

  dPerson()

  dendRestart()

  dhaveambt()

  if infinitive=="":

      print("no thing was enterd")

      bn = Label(window, text="WARNING: You Entered nothing, Enter some text and press the button above.")

      bn.grid(column=1, row=3,columnspan = 6)

      thisishereonperpose

  else:

      try:

        translate=translator.translate(infinitive, src= "it", dest='en')

        print(translate)

        if (translate.text[0:3])=="to ":

          bn = Label(window, text="The infinative "+infinitive+" means "+translate.text)

          bn.grid(column=1, row=3,columnspan = 6)

        else:

          bn = Label(window, text="The infinative "+infinitive+" means to "+translate.text)

          bn.grid(column=1, row=3,columnspan = 6)

      except:

        bn = Label(window, text="Error! The verb could not be tranlated to english due to no internet conection. Dodn't worry about this message, this seems to be a replit problem. Try copying the code into another pythib interrepter.")

        bn.grid(column=1, row=3,columnspan = 6)

      def blanktensebt():

        Presentbt.configure(bg=orig_color)

        Futurebt.configure(bg=orig_color)

        Imperfectbt.configure(bg=orig_color)

        Perfectbt.configure(bg=orig_color)

        Conditionalbt.configure(bg=orig_color)

      def Present():

        blanktensebt()

        Presentbt.configure(bg="#7eff70")

        dPerson()

        dendRestart()

        dhaveambt()

        global Tense

        Tense="present"

        print(Tense)

        doperson()

      def Future():

        blanktensebt()

        Futurebt.configure(bg="#7eff70")

        dPerson()

        dendRestart()

        dhaveambt()

        global Tense

        Tense="future"

        doperson()

      def Imperfect():

        blanktensebt()

        Imperfectbt.configure(bg="#7eff70")

        dPerson()

        dendRestart()

        dhaveambt()

        global Tense

        Tense="imperfect"

        doperson()

      def Perfect():

        blanktensebt()

        Perfectbt.configure(bg="#7eff70")

        dPerson()

        dendRestart()

        dhaveambt()

        global Tense

        Tense="perfect"

        doperson()

      def Conditional():

        blanktensebt()

        Conditionalbt.configure(bg="#7eff70")

        dPerson()

        dendRestart()

        dhaveambt()

        global Tense

        Tense="conditional"

        doperson()

      lab2 = Label(window, text="Click on the tense you want the verb to be in.")

      lab2.grid(column=1, row=4,columnspan = 6)

      Presentbt = Button(window, text ="Present",command= Present)

      Presentbt.grid(column=1, row=5)

      Futurebt = Button(window, text ="Future",command= Future)

      Futurebt.grid(column=2, row=5)

      Imperfectbt = Button(window, text ="Imperfect",command= Imperfect)

      Imperfectbt.grid(column=3, row=5)

      Perfectbt = Button(window, text ="Perfect",command= Perfect)

      Perfectbt.grid(column=4, row=5)

      Conditionalbt = Button(window, text ="Conditional",command= Conditional)

      Conditionalbt.grid(column=5, row=5)

 

Translate1 = Button(window, text ="Click to proceed",command= clicked)

Translate1.grid(column=1, row=2,columnspan = 6)

global orig_color

orig_color = Translate1.cget("background")

print("orig_color set !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")

window.mainloop()

If you modiify any code, please link the fork in the Replit comments. Thanks!