Question
Joes Automotive performs the following routine maintenance services: Oil change$30.00 Lube job$20.00 Radiator flush$40.00 Transmission flush$100.00 Inspection$35.00 Muffler replacement$200.00 Tire rotation$20.00 Write a GUI program
Joes Automotive performs the following routine maintenance services: Oil change$30.00 Lube job$20.00 Radiator flush$40.00 Transmission flush$100.00 Inspection$35.00 Muffler replacement$200.00 Tire rotation$20.00 Write a GUI program with check buttons that allow the user to select any or all of these services. When the user clicks a button the total charges should be displayed.
i need it to work for the entire question, this question is on here already with lots of answers but nothing that works compltly , one comes real close but dose not give a total at the end below is the code that works best but i still dosent have a total at the end
#import from tkinter import * root=Tk() root.title("Joe's Automotive") root.geometry("400x700") CheckVar1=IntVar() CheckVar2=IntVar() CheckVar3=IntVar() CheckVar4=IntVar() CheckVar5=IntVar() CheckVar6=IntVar() CheckVar7=IntVar()#Set the variables totalvalue=0 #The user can check off which jobs they would like to purchase Oil=Checkbutton(root,text="Oil Change - $30.00",variable=CheckVar1,onvalue=30\ ,offvalue=0,height=5,width=20) Lube=Checkbutton(root,text="Lube Job - $20.00",variable=CheckVar2,onvalue=20\ ,offvalue=0,height=5,width=20) RadiatorFlush=Checkbutton(root,text="Radiator Flush - $40.00",variable=CheckVar3,onvalue=40\ ,offvalue=0,height=5,width=20) Transmission=Checkbutton(root,text="Transmission Flush-$100.00",variable=CheckVar4,onvalue=100\ ,offvalue=0,height=5,width=20) Inspection=Checkbutton(root,text="Inspection- $35.00",variable=CheckVar5,onvalue=35\ ,offvalue=0,height=5,width=20) Muffler=Checkbutton(root,text="Muffler replacement- $200.00",variable=CheckVar6,onvalue=200\ ,offvalue=0,height=5,width=20) Tire=Checkbutton(root,text="Tire Rotation- $20.00",variable=CheckVar7,onvalue=20\ ,offvalue=0,height=5,width=20) somebutton=Button(root, text="Total") #Call each job Oil.pack() Lube.pack() RadiatorFlush.pack() Transmission.pack() Inspection.pack() Muffler.pack() Tire.pack() somebutton.pack() #main loop root.mainloop()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started