Python - SUMATORIA DE NUMEROS ENTEROS CON SEPARADORES DE MILLARES...

 
Vista:
sin imagen de perfil
Val: 37
Ha disminuido su posición en 8 puestos en Python (en relación al último mes)
Gráfica de Python

SUMATORIA DE NUMEROS ENTEROS CON SEPARADORES DE MILLARES...

Publicado por PENNELOPPE (14 intervenciones) el 23/08/2020 04:16:51
BUENAS NOCHES DEL FORO NECESITO UNA GRAN ORIENTACION DE PARTES DE USTEDES NECESITO QUE ME ORIENTE SOBRE :

- QUE A MEDIDA QUE INTRODUZCA NUMEROS ENTEROS ME PONGA LOS PUNTOS DE MILES EJEMPLO:
600000 QUE AL IR INTRODUCIENDO ME LO COLOQUE CON LOS PUNTOS 600.00 SIN DECIMALES

- LUEGO SUMARLOS Y EL RESULTADO TAMBIEN LO EXPRESE CON LOS PUNTOS DE MILES

600.000 + 400.000 = 1.000.000

YO LE HE CODIFICADO PERO ME SALE ERROR

CUANDO LO CODIFICO ASI NO ME SALE ERROR PERO LOS NUMEROS ESTAN EXPRESADO NORMAL
600000 + 400000 = 1000000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ------------- INTERFACES GRAFICAS -----------
 
 
inicio1 = Tk()
inicio1.title("CUENTAS CONTABLES")
inicio1.resizable(0,0)
inicio1.iconbitmap("contabilidad.ico")
miimag = PhotoImage(file = "registro1.png")
miimag1 = PhotoImage(file = "SALIR.png")
miimag2 = PhotoImage(file = "ADDIC.png")
miimag3 = PhotoImage(file = "reportes1.png")
miimag4 = PhotoImage(file = "eliminardoc.png")
 
inicio1.config(bg = "MediumSlateBlue", bd = 25, relief = "groove", cursor ="diamond_cross")
 
miframe1 = Frame(inicio1)
miframe1.config(bg = "MediumPurple",bd = 35, relief = "ridge")
miframe1.pack(anchor = "sw", fill= "x", expand = 1)
miframe3 = Frame(inicio1)
miframe3.config(bg = "MediumPurple",bd = 35, relief = "ridge")
miframe3.pack(anchor = "sw", fill= "x", expand = 1)
 
 
#------------ FUNCION SALIR DEL SISTEMA -------------
 
def salirsys():
	valor1 = messagebox.askokcancel("SALIR..","DESEA SALIR DEL SYSTEM?")
	if valor1 == True:
		inicio1.destroy()
 
#------------ FUNCION SUMA --------------------------
def  sumatot():
	sumaux = debebal.get() + haberbal.get()
	totalsuma.set(sumaux)
 
#------------ CONJUNTOS DE INTERFAZ------------------
 
totalsuma = IntVar()
totalsuma.set(0)
fechaac = date.today()
fecha = fechaac.strftime("%B %Y")
fechabal = StringVar()
fecha1 = fechaac.strftime("%d/%m/%y")
fechabal.set(fecha1)
debebal = IntVar()
debebal.set(600000)
haberbal = IntVar()
haberbal.set(400000)
descrip2 = Label(miframe1, text = "FECHA: ", fg = "MidnightBlue", font = ("Comic Sans MS", 10))
descrip2.config(bg="MediumPurple")
descrip2.grid(row = 0, column = 0,sticky = "w",padx = 15,pady = 5)
descrip2text = Entry(miframe1,fg = "Blue", font = ("Comic Sans MS",10), width = 50,textvariable = fechabal)
descrip2text.grid(row = 0, column = 1,sticky = "w",padx = 15,pady = 5)
codigop2p = Label(miframe1, text = "DEBE: ", fg = "MidnightBlue", font = ("Comic Sans MS", 10))
codigop2p.config(bg="MediumPurple")
codigop2p.grid(row = 1, column = 0,sticky = "w",padx = 15,pady = 5)
descrip2text = Entry(miframe1,fg = "Blue", font = ("Comic Sans MS",10), width = 50,textvariable = debebal)
descrip2text.grid(row = 1, column = 1,sticky = "w",padx = 15,pady = 5)
codigop2p = Label(miframe1, text = "HABER: ", fg = "MidnightBlue", font = ("Comic Sans MS", 10))
codigop2p.config(bg="MediumPurple")
codigop2p.grid(row = 2, column = 0,sticky = "w",padx = 15,pady = 5)
descrip2text = Entry(miframe1,fg = "Blue", font = ("Comic Sans MS",10), width = 50,textvariable = haberbal)
descrip2text.grid(row = 2, column = 1,sticky = "w",padx = 15,pady = 5)
codigop2 = Label(miframe1, text = "TOTAL: ", fg = "MidnightBlue", font = ("Comic Sans MS", 10))
codigop2.config(bg="MediumPurple")
codigop2.grid(row = 3, column = 0,sticky = "w",padx = 15,pady = 5)
codigop2text = Entry(miframe1,fg = "Blue", font = ("Comic Sans MS",10), width = 50, textvariable = totalsuma)
codigop2text.grid(row = 3, column = 1,sticky = "w",padx = 15,pady = 5)
 
 
#------------- BOTON DE CONECCION , ENTRADA Y SALIDA -------------
 
crearbotton5 = Button(miframe3, text = "SUMAR CUENTAS", fg = "MidnightBlue", font = ("Comic Sans MS",10, "bold"),
     anchor = CENTER, image = miimag3, compound = CENTER, command = sumatot)
crearbotton5.config(bg = "LightCyan",bd = 15, relief = "ridge")
crearbotton5.grid(row = 0, column = 0,sticky = "w",padx = 15,pady = 5)
salirbotton = Button(miframe3, text = "SALIR", fg = "MidnightBlue", font = ("Comic Sans MS",10, "bold"),
	anchor = CENTER, image = miimag1, compound = CENTER, command = salirsys)
salirbotton.config(bg = "LightCyan",bd = 15, relief = "ridge")
salirbotton.grid(row = 0, column = 3,sticky = "w",padx = 15,pady = 5)
 
inicio1.mainloop()

PERO AL COFICARLO ASI ME SALE ERROR PERO ME PRESENTA EL LOS CUADRO TEXTO CON LOS FORMATOS 600.000 Y 400.000 PERO AL SUMARLOS ME SALE ERROR
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
from tkinter import *
from tkinter import messagebox
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
import sqlite3
from tkinter import ttk
from tabulate import *
import wx
import wx.grid as wxgrid
import itertools
from random import randint
from statistics import mean
from datetime import datetime
from datetime import date
import math
 
 
# ------------- INTERFACES GRAFICAS -----------
 
 
inicio1 = Tk()
inicio1.title("CUENTAS CONTABLES")
inicio1.resizable(0,0)
inicio1.iconbitmap("contabilidad.ico")
miimag = PhotoImage(file = "registro1.png")
miimag1 = PhotoImage(file = "SALIR.png")
miimag2 = PhotoImage(file = "ADDIC.png")
miimag3 = PhotoImage(file = "reportes1.png")
miimag4 = PhotoImage(file = "eliminardoc.png")
 
inicio1.config(bg = "MediumSlateBlue", bd = 25, relief = "groove", cursor ="diamond_cross")
 
miframe1 = Frame(inicio1)
miframe1.config(bg = "MediumPurple",bd = 35, relief = "ridge")
miframe1.pack(anchor = "sw", fill= "x", expand = 1)
miframe3 = Frame(inicio1)
miframe3.config(bg = "MediumPurple",bd = 35, relief = "ridge")
miframe3.pack(anchor = "sw", fill= "x", expand = 1)
 
 
#------------ FUNCION SALIR DEL SISTEMA -------------
 
def salirsys():
	valor1 = messagebox.askokcancel("SALIR..","DESEA SALIR DEL SYSTEM?")
	if valor1 == True:
		inicio1.destroy()
 
#------------ FUNCION SUMA --------------------------
def  sumatot():
	sumaux = debebal.get() + haberbal.get()
	totalsuma.set(sumaux)
 
#------------ CONJUNTOS DE INTERFAZ------------------
 
totalsuma = IntVar()
totalsuma.set(0)
fechaac = date.today()
fecha = fechaac.strftime("%B %Y")
fechabal = StringVar()
fecha1 = fechaac.strftime("%d/%m/%y")
fechabal.set(fecha1)
debebal = IntVar()
debebal.set(format(600000,',d').replace(',','.'))
haberbal = IntVar()
haberbal.set(format(400000,',d').replace(',','.'))
descrip2 = Label(miframe1, text = "FECHA: ", fg = "MidnightBlue", font = ("Comic Sans MS", 10))
descrip2.config(bg="MediumPurple")
descrip2.grid(row = 0, column = 0,sticky = "w",padx = 15,pady = 5)
descrip2text = Entry(miframe1,fg = "Blue", font = ("Comic Sans MS",10), width = 50,textvariable = fechabal)
descrip2text.grid(row = 0, column = 1,sticky = "w",padx = 15,pady = 5)
codigop2p = Label(miframe1, text = "DEBE: ", fg = "MidnightBlue", font = ("Comic Sans MS", 10))
codigop2p.config(bg="MediumPurple")
codigop2p.grid(row = 1, column = 0,sticky = "w",padx = 15,pady = 5)
descrip2text = Entry(miframe1,fg = "Blue", font = ("Comic Sans MS",10), width = 50,textvariable = debebal)
descrip2text.grid(row = 1, column = 1,sticky = "w",padx = 15,pady = 5)
codigop2p = Label(miframe1, text = "HABER: ", fg = "MidnightBlue", font = ("Comic Sans MS", 10))
codigop2p.config(bg="MediumPurple")
codigop2p.grid(row = 2, column = 0,sticky = "w",padx = 15,pady = 5)
descrip2text = Entry(miframe1,fg = "Blue", font = ("Comic Sans MS",10), width = 50,textvariable = haberbal)
descrip2text.grid(row = 2, column = 1,sticky = "w",padx = 15,pady = 5)
codigop2 = Label(miframe1, text = "TOTAL: ", fg = "MidnightBlue", font = ("Comic Sans MS", 10))
codigop2.config(bg="MediumPurple")
codigop2.grid(row = 3, column = 0,sticky = "w",padx = 15,pady = 5)
codigop2text = Entry(miframe1,fg = "Blue", font = ("Comic Sans MS",10), width = 50, textvariable = totalsuma)
codigop2text.grid(row = 3, column = 1,sticky = "w",padx = 15,pady = 5)
 
 
#------------- BOTON DE CONECCION , ENTRADA Y SALIDA -------------
 
crearbotton5 = Button(miframe3, text = "SUMAR CUENTAS", fg = "MidnightBlue", font = ("Comic Sans MS",10, "bold"),
     anchor = CENTER, image = miimag3, compound = CENTER, command = sumatot)
crearbotton5.config(bg = "LightCyan",bd = 15, relief = "ridge")
crearbotton5.grid(row = 0, column = 0,sticky = "w",padx = 15,pady = 5)
salirbotton = Button(miframe3, text = "SALIR", fg = "MidnightBlue", font = ("Comic Sans MS",10, "bold"),
	anchor = CENTER, image = miimag1, compound = CENTER, command = salirsys)
salirbotton.config(bg = "LightCyan",bd = 15, relief = "ridge")
salirbotton.grid(row = 0, column = 3,sticky = "w",padx = 15,pady = 5)
 
inicio1.mainloop()
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
-1
Responder