1

Temat: Średnia + from

import tkinter as tk

def sprawdz():
    oceny = entry.get()
    suma=0
    for i in oceny:
        suma+=int(i)
        root.title("Średnia: "+str(suma/len(oceny)))

root = tk.Tk()
root.title("Średnia")
root.geometry("400x300")

entry = tk.Entry(root, width=30)
entry.place(x=50, y=50)

button = tk.Button(root, text="Średnia", command=sprawdz)
button.place(x=50, y=80)

root.mainloop()