QUESTION 1
Consider a Python GUI program that produces a window with the following widgets: a text box to display the value of one element of a given list (e.g., a list of the five vowels): a button to retrieve the previous value in that list (if there is one). This button is disabled if there is no previous value in the list
a label to display the number of the item being displayed and the total number of items (e.g-, 1/5) The initial output is as shown below:
a
1/5
Hitting the ">> next button once (from the initial state above) produces the following output: Vowels
e
Hitting the > next button three more times produces the following output:
u
5/5
Most of the back-end of the program has already been written. Amongst other things, the following variables have been created: window = Ik() labelCounter = Label(window, text = n") to display the current and total item numbers counter = o # the index of the list item being displayed input_list = ['a', 'e','i', 'o','u'] list of vowels YOUR TASK is to complete the display_count er function which redisplays the item number after a button has been pushed and the count er variable has been updated accordingly (e.g., 2/5"). def display_counter() : )ais= indano
NB:count counter counter +1 str(len(input_list) - 1) QUESTION str(len(input_list) + 1) str(len(input_list)) Consider a P output = [abelCounter[text'] IabelCounter['text'] = counter/len(input_list) labelCounter['text'] = output
eated.
6, in the following formation: