Week 11 APP Tutorial Assignment
Week 11 APP Tutorial Assignment
SCHOOL OF COMPUTING
1. Place Method:
1. Create a window and place a label, button, and entry widget using absolute positioning. Adjust
their positions and dimensions to your liking.
2. Place multiple labels and buttons in a grid-like arrangement using the place method. Experiment
with different coordinates and dimensions to create a more complex layout.
3. Place a label with an image using the place method. Adjust the image's position and size to fit
within the label.
Fill:
Experiment with different fill values for each widget (e.g., fill=tk.X, fill=tk.Y, fill=tk.BOTH) and
observe how their sizes change when the window is resized.
Expand:
Side:
Resize the window and see how these widgets expand to fill the available space.
Place widgets on different sides of the window (e.g., side=tk.TOP, side=tk.BOTTOM, side=tk.LEFT,
side=tk.RIGHT). Observe how their positions change relative to each other.
2.Grid Method:
1. Create a window and place a label, button, and entry widget using the grid method. Specify their
row and column indices to arrange them in a grid-like layout.
2. Create a grid of labels using the grid method. Experiment with different row and column spans
to create varying grid cell sizes.
3. Place a label with an image using the grid method. Adjust the image's row and column indices
and spans to fit within the grid cell.
3.Pack Method:
1. Create a window and place a label, button, and entry widget using the pack method. Experiment
with different pack options (side, fill, expand) to observe how they affect the widget's
placement.
2. Place multiple labels and buttons in a vertical or horizontal stack using the pack method. Adjust
the pack options to control the direction and spacing.
3. Place a label with an image using the pack method. Adjust the pack options to control the
image's size and alignment within the label.
4. Label:
5.Button:
• Create a flat button using the Button widget with the relief attribute set to "flat".
6.Textbox:
7.Entry Method:
2. Use the width and height attributes to control the frame's dimensions.
1. Create widgets (e.g., buttons, labels) and pack or grid them within the frame.
Advanced Level:
Create a basic calculator interface using Tkinter, organized in a grid layout. The calculator should have
buttons for numbers (0-9), basic operations (+, -, *, /), and a button for calculating the result.