StudyToCert

All certifications / PCEP / Lessons

PCEP – Certified Entry-Level Python Programmer PCEP-30-02 · Domain 4: Functions and exceptions

Default parameter values and why defaults must follow required parameters

▶ Watch the overview video

Last reviewed September 30, 2026 · Leer en español

A parameter can be given a default value in the function definition with name=value. If the caller supplies an argument for it, that argument is used; if not, the default is used. This lets one function serve both simple and detailed calls, and it lets you add new options to an existing function without breaking the calls that already use it. print() itself works this way: sep defaults to a space and end to a newline, which is why print("a", "b") shows a b and moves to a new line unless you say otherwise.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study PCEP for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the PCEP study plan