Courseiva
easyMultiple ChoiceObjective-mapped

200-901 Practice Question: In Python, which keyword is used to define a…

In Python, which keyword is used to define a function that does not return any value?

⚠ Common exam trap

Cisco often tests the distinction between keywords that *define* a function (`def`) and keywords that *control flow* within a function (`return`, `yield`, `pass`), leading candidates to confuse the purpose of `return` with the definition itself.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

def

In Python, the `def` keyword is used to define any function, regardless of whether it returns a value. A function that does not explicitly return a value automatically returns `None`. The `def` keyword is the correct answer because it is the fundamental syntax for function definition, and the question asks for the keyword used to define the function itself, not the mechanism for returning or omitting a value.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • pass

    Why it's wrong here

    pass is a no-operation statement, not used to define functions.

  • yield

    Why it's wrong here

    yield is used to define generator functions that produce a sequence of values.

  • return

    Why it's wrong here

    return is used to exit a function and optionally return a value.

  • def

    Why this is correct

    def is the keyword to define any function in Python.

About these practice questions

This 200-901 question is part of Courseiva's 989-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.