✓ Board-verified
Computer Science · 2026 · 2 marks
CBSE 2026 · Central · Set 4 · Q22
What is the difference between default parameters and positional parameters in Python? Also give an example of a function header which uses both.
What is the difference between default parameters and positional parameters in Python ? Also give an example of a function header which uses both.
Marking-scheme solution
● Default parameters have default values whereas positional parameters are assigned values to them based on their position in the function call.
● In a function header, default parameters are always written after positional parameters(if any).
Example :
def Q22(X, Y=10): # Here Y is default & X is positional parameterMore from Functions
CBSE Class 12 Computer Science past-paper question from the 2026 board exam, with the answer as CBSE’s own marking scheme gives it. Where our answers come from.