label(popuptext='popup'bg='black'fg=colorpack( config(fg=colordef timer() config(fg=random choice(colors)win after( timerdef grow()global fontsize fontsize + config(font=('arial'fontsize'italic')win after( growwin tk( label(wintext='spam'font=('arial'fontsize'italic')fg='yellow'bg='navy'relief=raisedl pack(side=topexpand=yesfill=bothbutton(wintext='press'command=(lambdareply('red'))pack(side=bottomfill=xbutton(wintext='timer'command=timerpack(side=bottomfill=xbutton(wintext='grow'command=growpack(side=bottomfill=xwin mainloop(similar to priorbut use classes so each window has own state information from tkinter import import random class mygui"" gui with buttons that change color and make the label grow ""colors ['blue''green''orange''red''brown''yellow'def __init__(selfparenttitle='popup')parent title(titleself growing false self fontsize self lab label(parenttext='gui 'fg='white'bg='navy'self lab pack(expand=yesfill=bothbutton(parenttext='spam'command=self replypack(side=leftbutton(parenttext='grow'command=self growpack(side=leftbutton(parenttext='stop'command=self stoppack(side=leftdef reply(self)"change the button' color at random on spam pressesself fontsize + color random choice(self colorsself lab config(bg=colorfont=('courier'self fontsize'bold italic')def grow(self)"start making the label grow on grow presses appendix dsolutions to end-of-part exercises