Hello, Im trying to get this program to display a receipt of the items bought with its price and total, but so far this is what I've acomplished, I've been trying for a long time now, to make it print the receipt in the win2 but I haven't been able.
helpp pls
from graphics import *
def main():
win = GraphWin("WalMart Receipt", 600, 900)
#Title
center = Point(300,20)
label = Text(center, "WalMart Receipt Maker")
label.draw(win)
label.setSize(20)
#Item and Price input 1
center2 = Point(50,50)
label2 = Text(center2, "Item >>")
label2.draw(win)
input2 = Entry(Point(170,55), 20)
input2.setText("item")
input2.draw(win)
centera = Point(350,50)
labela = Text(centera, "Price >>")
labela.draw(win)
inputa = Entry(Point(420,55), 6)
inputa.setText("0.00")
inputa.draw(win)
#Item and Price input 2
center3 = Point(50,100)
label3 = Text(center3, "Item >>")
label3.draw(win)
input3 = Entry(Point(170,105), 20)
input3.setText("item")
input3.draw(win)
centerb = Point(350,100)
labelb = Text(centerb, "Price >>")
labelb.draw(win)
inputb = Entry(Point(420,105), 6)
inputb.setText("0.00")
inputb.draw(win)
#Item and Price input 3
center4 = Point(50,150)
label4 = Text(center4, "Item >>")
label4.draw(win)
input4 = Entry(Point(170,155), 20)
input4.setText("item")
input4.draw(win)
centerc = Point(350,150)
labelc = Text(centerc, "Price >>")
labelc.draw(win)
inputc = Entry(Point(420,155), 6)
inputc.setText("0.00")
inputc.draw(win)
#Item and Price input 4
center5 = Point(50,200)
label5 = Text(center5, "Item >>")
label5.draw(win)
input5 = Entry(Point(170,205), 20)
input5.setText("item")
input5.draw(win)
centerd = Point(350,200)
labeld = Text(centerd, "Price >>")
labeld.draw(win)
inputd = Entry(Point(420,205), 6)
inputd.setText("0.00")
inputd.draw(win)
#Item and Price input 5
center6 = Point(50,250)
label6 = Text(center6, "Item >>")
label6.draw(win)
input6 = Entry(Point(170,255), 20)
input6.setText("item")
input6.draw(win)
centere = Point(350,250)
labele = Text(centere, "Price >>")
labele.draw(win)
inpute = Entry(Point(420,255), 6)
inpute.setText("0.00")
inpute.draw(win)
#Item and Price input 6
center7 = Point(50,300)
label7 = Text(center7, "Item >>")
label7.draw(win)
input7 = Entry(Point(170,305), 20)
input7.setText("item")
input7.draw(win)
centerf = Point(350,300)
labelf = Text(centerf, "Price >>")
labelf.draw(win)
inputf = Entry(Point(420,305), 6)
inputf.setText("0.00")
inputf.draw(win)
#Item and Price input 7
center8 = Point(50,350)
label8 = Text(center8, "Item >>")
label8.draw(win)
input8 = Entry(Point(170,355), 20)
input8.setText("item")
input8.draw(win)
centerg = Point(350,350)
labelg = Text(centerg, "Price >>")
labelg.draw(win)
inputg = Entry(Point(420,355), 6)
inputg.setText("0.00")
inputg.draw(win)
#Item and Price input 8
center9 = Point(50,400)
label9 = Text(center9, "Item >>")
label9.draw(win)
input9 = Entry(Point(170,405), 20)
input9.setText("item")
input9.draw(win)
centerh = Point(350,400)
labelh = Text(centerh, "Price >>")
labelh.draw(win)
inputh = Entry(Point(420,405), 6)
inputh.setText("0.00")
inputh.draw(win)
#Item and Price input 9
center10 = Point(50,450)
label10 = Text(center10, "Item >>")
label10.draw(win)
input10 = Entry(Point(170,455), 20)
input10.setText("item")
input10.draw(win)
centeri = Point(350,450)
labeli = Text(centeri, "Price >>")
labeli.draw(win)
inputi = Entry(Point(420,455), 6)
inputi.setText("0.00")
inputi.draw(win)
#Item and Price input 10
center11 = Point(50,500)
label11 = Text(center11, "Item >>")
label11.draw(win)
input11 = Entry(Point(170,505), 20)
input11.setText("item")
input11.draw(win)
centerj = Point(350,500)
labelj = Text(centerj, "Price >>")
labelj.draw(win)
inputj = Entry(Point(420,505), 6)
inputj.setText("0.00")
inputj.draw(win)
#Item and Price input 11
center12 = Point(50,550)
label12 = Text(center12, "Item >>")
label12.draw(win)
input12 = Entry(Point(170,555), 20)
input12.setText("item")
input12.draw(win)
centerk = Point(350,550)
labelk = Text(centerk, "Price >>")
labelk.draw(win)
inputk = Entry(Point(420,555), 6)
inputk.setText("0.00")
inputk.draw(win)
#Item and Price input 12
center13 = Point(50,600)
label13 = Text(center13, "Item >>")
label13.draw(win)
input13 = Entry(Point(170,605), 20)
input13.setText("item")
input13.draw(win)
centerl = Point(350,600)
labell = Text(centerl, "Price >>")
labell.draw(win)
inputl = Entry(Point(420,605), 6)
inputl.setText("0.00")
inputl.draw(win)
#Item and Price input 13
center14 = Point(50,650)
label14 = Text(center14, "Item >>")
label14.draw(win)
input14 = Entry(Point(170,655), 20)
input14.setText("item")
input14.draw(win)
centerm = Point(350,650)
labelm = Text(centerm, "Price >>")
labelm.draw(win)
inputm = Entry(Point(420,655), 6)
inputm.setText("0.00")
inputm.draw(win)
#Item and Price input 14
center15 = Point(50,700)
label15 = Text(center15, "Item >>")
label15.draw(win)
input15 = Entry(Point(170,705), 20)
input15.setText("item")
input15.draw(win)
centern = Point(350,700)
labeln = Text(centern, "Price >>")
labeln.draw(win)
inputn = Entry(Point(420,705), 6)
inputn.setText("0.00")
inputn.draw(win)
#Item and Price input 15
center16 = Point(50,750)
label16 = Text(center16, "Item >>")
label16.draw(win)
input16 = Entry(Point(170,755), 20)
input16.setText("item")
input16.draw(win)
centero = Point(350,750)
labelo = Text(centero, "Price >>")
labelo.draw(win)
inputo = Entry(Point(420,755), 6)
inputo.setText("0.00")
inputo.draw(win)
#print receipt button
rect5 = Rectangle(Point(240,800), Point(360,850))
rect5.draw(win)
center5 = Point(300,825)
button = Text(center5, "Print Receipt")
button.draw(win)
button.setSize(10)
button.setFill('Orange')
win.getMouse()
win2 = GraphWin("WalMart Receipt", 600, 900)
#Title 2
center = Point(300,20)
label22 = Text(center, "WalMart Receipt")
label22.draw(win2)
label22.setSize(20)
x = eval(inputa.getText())
output.setText(x)
output = Text(Point(170,55), "")
output.draw(win2)
main()