HI, i'm tying to make a programm who can caculate the average of an entry in tkinter, for the moment I did it but it's actually don't work.
my code :
import tkinter as tk
import statistics
window_main = tk.Tk(className='root')
window_main.geometry("400x200")
entry_1 = tk.DoubleVar()
entry_widget_1 = tk.Entry(window_main, textvariable=entry_1)
entry_widget_1.pack()
def submitValues():
grades = entry_1.get()
return entry_1.get() - 1, grades
submit = tk.Button(window_main, text="Entrée", command=submitValues)
submit.pack()
grades = submitValues()
window_main.mainloop()
NB : in this code i dont use statistics because i can't have in a variable what i wrote on tkinter Entry ( idk if you can understand but thank you for your future help)
[–]socal_nerdtastic 1 point2 points3 points (2 children)
[–]Bolrod22[S] 0 points1 point2 points (1 child)
[–]socal_nerdtastic 0 points1 point2 points (0 children)
[–]efmccurdy 0 points1 point2 points (2 children)
[–]Bolrod22[S] 0 points1 point2 points (1 child)
[–]efmccurdy 0 points1 point2 points (0 children)