← VCE Software Development U3O1

What a graphical user interface (GUI) is

A graphical user interface: windows and controls like buttons and text boxes the user clicks or types in. The program waits for events, such as a click, and responds to each one.

Understanding What a graphical user interface (GUI) is in VCE Software Development U3O1

What it does: Entry creates a text box. It is a control designed for user input in a GUI. This function is an event handler. It only runs when the event happens, rather than in a fixed order from top to bottom. A GUI (graphical user interface) lets users interact through windows and controls. Console programs use text only. Event-driven programs keep running and wait for the user to do something. Each event triggers a response. An event is an action, usually from the user, that the program can respond to. Clicks, key presses and selections are events. Buttons trigger actions when clicked. A text box (Entry) is used for typing in text.

Common mistakes: Python is case sensitive. The control class is Button with a capital B, so it should be tk.Button(r, text="Go"). The brackets call go() straight away instead of waiting for a click. The event handler must be passed without brackets: command=go.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 114–124) and word search (Modules 114–141).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which statement best describes a GUI?
Windows and controls such as buttons and text boxes that the user clicks or types inA program that only shows text and takes typed commands in a console
Matches
Button(window, text="Go", command=start())
↓
start() has brackets, so the function runs immediately when the button is created instead of on a click. Use command=start.
Applying
Meanings
Term
GUI
Meaning
A graphical user interface: windows and controls like buttons and text boxes the user clicks or types in. The program waits for events, such as a click, and responds to each one.
Practice
import tkinter as tk
Testing
Gaps
root = tk.()
Check Answer
Spots
2r = tk.Tk()
3btn = tk.button(r, text="Go")

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Kangaroo Rat' badge — Speed Typer, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which statement best describes a GUI?
A. Windows and controls such as buttons and text boxes that the user clicks or types in ✓
B. A program that only shows text and takes typed commands in a console
A GUI (graphical user interface) lets users interact through windows and controls. Console programs use text only.
2. In an event-driven GUI program, what does the program do after it shows the window?
A. It runs every line once from top to bottom and then ends straight away
B. It waits for events such as a button click, then responds to each one ✓
Event-driven programs keep running and wait for the user to do something. Each event triggers a response.
3. Which of these is an event?
A. The user clicks a Submit button ✓
B. A variable is given the value 10
An event is an action, usually from the user, that the program can respond to. Clicks, key presses and selections are events.
4. What is the main purpose of a Button control?
A. Lets the user trigger an action by clicking it ✓
B. Lets the user type in a line of text
Buttons trigger actions when clicked. A text box (Entry) is used for typing in text.
5. Which control would you choose to let a user type their name?
A. A Label
B. A text box (Entry) ✓
A text box accepts user input. A Label only displays text for the user to read.

Match the Pairs

Button(window, text="Save", command=save_data) → Creates a button control that runs the save_data function when the user clicks it
window.mainloop() → Starts the event loop so the window stays open and waits for the user to click or type
A text box control lets the user type in a value for the program to use → name_box = Entry(window)
A GUI program is event-driven: it runs a function in response to a user action such as a click → def on_click(): print("Clicked")
Button(window, text="Go", command=start()) → start() has brackets, so the function runs immediately when the button is created instead of on a click. Use command=start.
window = Tk() Label(window, text="Hi").pack() → There is no window.mainloop() at the end, so the window closes straight away and never waits for events.

Key Term

GUI
A graphical user interface: windows and controls like buttons and text boxes the user clicks or types in. The program waits for events, such as a click, and responds to each one.

Fill in the Blanks

1. import tkinter as tk root = tk.Tk() root.title("My App")
Hint: Type the class name that creates the main window of a GUI program.
2. root = tk.Tk() btn = tk.Button(root, text="Click me") btn.pack()
Hint: Type the control class the user clicks to trigger an action.
3. entry = tk.Entry(root) entry.pack()
Hint: Type the control class that gives the user a text box to type in.
4. def greet(): print("Hi!") btn = tk.Button(root, command=greet)
Hint: Type the argument name that links a click event to the function that handles it.
5. btn.pack() root.mainloop()
Hint: Type the method that keeps the window open and waits for events such as clicks.

Spot the Error

Question 1
A import tkinter as tk
B r = tk.Tk()
C btn = tk.button(r, text="Go")
D btn.pack()
E r.mainloop()
Line C — Python is case sensitive. The control class is Button with a capital B, so it should be tk.Button(r, text="Go").
Question 2
A r = tk.Tk()
B def go():
C print("Clicked")
D b = tk.Button(r, command=go())
E b.pack()
Line D — The brackets call go() straight away instead of waiting for a click. The event handler must be passed without brackets: command=go.
Question 3
A import tkinter as tk
B r = tk.Tk()
C lbl = tk.Label(r, txt="Hi")
D lbl.pack()
E r.mainloop()
Line C — A Label has no option called txt. The option that sets the displayed words is text, so it should be text="Hi".
Question 4
A import tkinter as tk
B root = tk.Window()
C root.title("Quiz")
D root.mainloop()
Line B — The main window of a tkinter GUI is created with tk.Tk(). There is no tk.Window() class, so it should be root = tk.Tk().
Question 5
A root = tk.Tk()
B root.title("App")
C root.mainloop
D print("Closed")
Line C — Without brackets mainloop is never called, so the program never starts waiting for events like clicks. It should be root.mainloop().

Student with a class code? Join your class →