as per writer 32
October 9, 2021
i need answers to my weekly discussion question in my visual arts class 1
October 9, 2021

# create root windowroot = tk.Tk()root.title(“MPG Calculator”) import tkinter as tkfrom tkinter import ttkdef click_calculateButton():   miles = float( milesText.get() )   # get miles driven from the miles textfield   gas = float( gasText.get() )       # get gas used from the gas textfield   mpg = miles / gas                  # do the math!   mpgText.set( round(mpg,1) )        # display the outputdef command_exitButton():   root.destroy()root.geometry(“280×150″)   # size of window# create frame and add it to the root windowframe = ttk.Frame(root, padding=”10 10 10 10″)frame.pack(fill=tk.BOTH, expand=True)# create labels and textfieldsttk.Label(frame, text=”Miles Driven:”).grid(column=0, row=0, padx=5, pady=5, sticky=tk.E) # display label in gridmilesText = tk.StringVar()ttk.Entry(frame, width=25, textvariable=milesText).grid(column=1, row=0)ttk.Label(frame, text=”Gas Used:”).grid(column=0, row=1, padx=5, pady=5, sticky=tk.E)gasText = tk.StringVar()ttk.Entry(frame, width=25, textvariable=gasText).grid(column=1, row=1)# create button and add it to the windowttk.Button(frame, text=”Calculate”, command=click_calculateButton).grid(column=0, row=2, padx=5, pady=5, sticky=tk.E)ttk.Button(frame, text=”Exit”, command=command_exitButton).grid(column=1, row=2, padx=5, pady=5, sticky=tk.W)ttk.Label(frame, text=”MPG:”).grid(column=0, row=3, padx=5, pady=5, sticky=tk.E)mpgText = tk.StringVar()mpgEntry = ttk.Entry(frame, width=25, textvariable=mpgText, state=”readonly”).grid(column=1, row=3) # notice readonly!
“Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!”

The post Engineering homework help appeared first on Coursework Geeks.

"Is this question part of your assignment? We Can Help!"

Essay Writing Service