hola a quien lea esto estoy intentando terminar mi primer programa con python y me he atascado no
se como continuar cualquier tipo de ayuda me haria feliz el programa se supone que tiene que sumar las horas con tkinter asi de simple dice mi padre
from tkinter import *
from tkinter import messagebox
from datetime import datetime, timedelta
lista=[]
hola=datetime.now()
hola1=hola.strftime(" %d %H:%M:%S %Y %A %B" )
def consultar():
def operacion():
numero =num.get()
if opcion.get()==1:
total = numero * 10
elif opcion.get()==2:
total =numero * 20
elif opcion.get()==3:
total =numero * 30
elif opcion.get()==4:
total =numero * 40
elif opcion.get()==5:
total =numero * 50
elif opcion.get()==7:
total=numero+opcion
else :
total = numero * numero
r = Text(ventana,width=80,height=15)
lista.sort()
valores = []
r.insert(INSERT,hola1)
for elemento in lista:
arreglo = elemento.split('$')
valores.append(arreglo[3])
r.insert(INSERT,total)
r.place(x=20,y=230)
r.config(state=DISABLED)
ventana = Tk()
opcion = IntVar()
num = IntVar()
consultar()
ventana.title("Sumador de Horas")
ventana.geometry("700x650")
etiqueta1 = Label(ventana,text="hora actual: ").place(x=20,y=20)
etiqueta3 = Label(ventana,text=hola1).place(x=100,y=20)
etiqueta2= Label(ventana,text="elige: ").place(x=20,y=50)
x10 = Radiobutton(ventana,text="X10",value=1,variable=opcion).place(x=20,y=80)
x20 = Radiobutton(ventana,text="X20",value=2,variable=opcion).place(x=70,y=80)
x30 = Radiobutton(ventana,text="X30",value=3,variable=opcion).place(x=120,y=80)
x40 = Radiobutton(ventana,text="X40",value=4,variable=opcion).place(x=20,y=110)
x50 = Radiobutton(ventana,text="X50",value=5,variable=opcion).place(x=70,y=110)
cuadrado = Radiobutton(ventana,text="Cuadrado",value=6,variable=opcion).place(x=120,y=110)
otro=Radiobutton(ventana,text="Otro: ",value=7,variable=opcion).place(x=20,y=140)
cajanumero1=Entry(ventana,textvariable=opcion).place(x=70,y=140)
boton=Button(ventana,text="ralizar operacion",command=consultar).place(x=20,y=180)
ventana.mainloop()