Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1label.grid(row=0, column=1) | AThe argument name is wrong. grid() uses column, not col. It should be submit_button.grid(row=1, column=0). | |
| 2entry.pack() | Bgrid() and pack() are mixed in the same window. This causes tkinter to fail or freeze. Use grid() for every control, e.g. name_entry.grid(row=0, column=1). | |
| 3Add 10 pixels of space on the left and right of a control in a grid layout | CStacks the entry control in the window below the controls that were packed before it. | |
| 4Make a heading label stretch across two columns of the grid | Dtitle.grid(row=0, column=0, columnspan=2) | |
| 5name_label.grid(row=0, column=0) name_entry.pack() | EPlaces the label in the first row (row 0) and second column (column 1) of the window's table-like layout. | |
| 6submit_button.grid(row=1, col=0) | Fbutton.grid(row=2, column=0, padx=10) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
control.grid(row=0, column=1) — Places a control in a table-like layout at the given row and column. pack() instead stacks controls in order. Never mix grid and pack in one window.lblName.grid(row=0, column=0)entName.grid(row=0, column=1)btnSave.grid(row=2, column=0, columnspan=2)lblName.grid(row=1, column=0, padx=8)btnOk.pack(pady=5)