1. Home
  2. Data Science
  3. Python
  4. What is the output of the following Python code snippet?

Added 25 Nov 2026

What is the output of the following Python code snippet?

def f(a, b):
return a * b
print(f(b=5, a=3))
  1. 15 Correct answer
  2. 5
  3. Error
  4. 10

Correct answer

A. 15

MCQSEXAM

Explanation

Keyword arguments can be passed in any order.

Reference

Asked in: Python Interview Functions

https://docs.python.org/3/tutorial/controlflow.html#defining-functions

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs