📌Semra KAVAS - Dictionary Application – Project Output

 We are happy to share that our Dictionary Application, developed by our students, has been successfully completed. This application was created collaboratively as part of our project activities.

 

During this process, our students practiced Python programming and developed a simple dictionary application with a user interface. This work is an important project output of our activities.

 

You can download the application from the 5.4.11 Dictionary App page and review the Python codes. 



Dictionary App Python Codes

 

importtkinterastk

fromtkinterimportmessagebox

fromPILimportImageImageTk


 dictionary = {

    "hello": {

        "TR""merhaba",

        "PL""cześć",

        "PT""olá"

    },

    "school": {

        "TR""okul",

        "PL""szkoła",

        "PT""escola"

    },

    "student": {

        "TR""öğrenci",  #Ahmed

        "PL""uczeń",  #Michał

        "PT""estudante"#Asafy

    },

    "dictionary": {

        "TR""sözlük"#Hüseyin

        "PL""słownik",  #Michał

        "PT""dicionário"#Asafy

    },

    "word": {

        "TR""kelime"#Hüseyin

        "PL""słowo",  #Michał

        "PT""palavra"#Asafy

    },


     "survey": {

        "TR""anket"#Suat

        "PL""ankieta",  #Michał

        "PT""inquérito"#Artur

    },

    "project": {

        "TR""proje",#İnci

        "PL""projekt",  #Michał

        "PT""Pprojeto ",#Francisco

    },

    "computer": {

        "TR""bilgisayar",  #Ahmed

        "PL""komputer",   #Michał

        "PT""computador",#Dinis

    },

    "programming": {

        "TR""programlama"#Suat

        "PL""programowanie",  #Michał

        "PT""programação"#Hugo

    },

    "circuit": {

        "TR""devre"#Bora

        "PL""obwód",  #Michał

        "PT""circuito",  #JoaoGomes

    },

    "electronic circuit": {

        "TR""elektronik devre",#Efe

        "PL""obwód elektryczny",  #Michał

        "PT""circuito eletrónico"#Mônica

    },

    "programming": {

        "TR""programlama "#Suat

        "PL""programowanie",  #Michał

        "PT""programação"#Hugo

    },

    "artificial intelligence": {

        "TR""yapay zeka"#Uras

        "PL""sztuczna inteligencja",  #Michał

        "PT""inteligência artificial"#TiagoQuerido

    },

    "electronic ": {

        "TR""elektronik"#Efe

        "PL""elektronika"#Wiktor

        "PT""eletrónica"#TiagoLopes

    },

    "loop": {

        "TR""döngü"#Irmak

        "PL""pętla"#Wiktor

        "PT""ciclo"#TiagoLopes

    },

    "digital": {

         "TR":"dijital"#Bora

        "PL""cyfrowy"#Wiktor

        "PT""digital"#Mônica

    },

    "citizenship": {

        "TR""vatandaşlık"#Irmak

        "PL""obywatelstwo"#Wiktor

        "PT""cidadania"#JoãoSilva

    },

    "learn": {

        "TR""öğrenmek",#Uras

        "PL""uczyć się"#Wiktor

        "PT""aprender"#Leandro

    },

    "love": {

        "TR""aşk"#İnci

        "PL""miłość"#Wiktor

        "PT""amor"#Afonso

    }

   }

defclear_results(event):

    entry.delete(0tk.END)

    result_label.config(text="")

    text_area.delete("1.0"tk.END)


defsearch_word():

    word = entry.get().lower()

 

    ifwordindictionary:

        result_label.config(

            text=f"Turkish: {dictionary[word]['TR']}\n"

                 f"Polish: {dictionary[word]['PL']}\n"

                 f"Portuguese: {dictionary[word]['PT']}"

        )

    else:

        messagebox.showerror("Error""Word not found")


 defshow_all_words():

    text_area.delete("1.0"tk.END)


    forwordtranslationsindictionary.items():

        text_area.insert(tk.ENDf"Word: {word}\n")

        text_area.insert(tk.ENDf" Turkish: {translations['TR']}\n")

        text_area.insert(tk.ENDf" Polish: {translations['PL']}\n")

        text_area.insert(tk.ENDf" Portuguese: {translations['PT']}\n")

        text_area.insert(tk.END"-"*25 + "\n")


 

window = tk.Tk()

window.title("AI & Industry Explorers Dictionary")

window.geometry("520x650")


 # LOGO

img = Image.open("logo.png")

img = img.resize((200,200))

logo = ImageTk.PhotoImage(img)


 logo_label = tk.Label(window,image=logo)

logo_label.pack(pady=10)

 

title = tk.Label(window,text="AI & Industry Explorers Dictionary",

font=("Arial",16,"bold"))

title.pack(pady=5)


 entry = tk.Entry(window,font=("Arial",12),width=30)

entry.pack(pady=5)

 

entry.bind("<Button-1>"clear_results)

search_button = tk.Button(window,text="Search Word",command=search_word)

search_button.pack(pady=5)

 

show_button = tk.Button(window,text="Show All Words",command=show_all_words)

show_button.pack(pady=5)


 entry.bind("<Button-1>"clear_results)

 

result_label = tk.Label(window,text="",font=("Arial",12))

result_label.pack(pady=10)

 

text_area = tk.Text(window,height=15,width=55)

text_area.pack(pady=10)


 window.mainloop()

Yorumlar

Bu blogdaki popüler yayınlar

Semra KAVAS📢 - Project Meeting with Our Students and Teachers

🔐 Safe Internet Use Presentation