Showing messages with messagebox
Pops up a message window to tell the user a result. Its partner messagebox.showerror() pops up an error, such as when a handler finds invalid input. Both need a title and a message.
Understanding Showing messages with messagebox in VCE Software Development U3O1
What it does: messagebox must be imported from tkinter before messagebox.showinfo() or messagebox.showerror() can be called. This is a validation error message in a handler: the check fails, so showerror() tells the user what went wrong. showinfo() is for telling the user about a normal result. showerror() is kept for problems such as invalid input. showinfo() opens a pop-up window. It needs a title (shown on the window bar) and a message (shown in the body). It does not print to the console.
Common mistakes: This is not valid Python import syntax. It should be 'from tkinter import messagebox' so messagebox.showinfo() can be used. The input is invalid, so the user should see an error pop-up. Use messagebox.showerror(t, m), not showinfo.
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 125–141) 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.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
messagebox.showinfo()Fill in the Blanks
Spot the Error
Student with a class code? Join your class →