Question: Please help me with these codes 9. [15] Complete the program below to display the following GUI Use a lambda expression if possible. 2 0
9. [15] Complete the program below to display the following GUI Use a lambda expression if possible. 2 0 0 Vote Andri Vote Syifa Vote Andri Vote Syifa 2 Vote Andri Vote Syifa For instance, at the beginning, the program shows the GUI on the left. If button "Vote Andri" is clicked twice the GUI in the middle is shown. After that, if button "Vode Syifa" is clicked, the GUI on the right is shown. Answer: from tkinter import class Voting: def _init__(self): self window - self.window.title("E-Vote") self.window.geometry("270x180") self.votesofAndri - self.votesOfAndri.set(e) self.votesOfSyifa - IntVar() self.votesofSyifa.set(e) self. label_andri - Label(self.window, font="Arial 18", textvariables self.votesOfAndri) self. label_syifa - Label(self window, font="Arial 18, textvariable- self.votesofsyifa) self.label_andri.grid(rowe, column) self. labelsyifa.grid(row-, column-1) self.button_andri - Button(self.window, text "Vote Andri", font="Arial 18, command- self.button_andri.grid(row-1, column) self.button_syifa Button(self.window, text-"Vote Syifa", font="Arial 18", command self.button_syifa.grid(rowi, column-1) self window gui = Voting()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
