Learn Before
Multiple Choice

A developer has started writing a Python function but needs help finishing the implementation. They have the following code:

def calculate_factorial(n): """Calculates the factorial of a non-negative integer n.""" # Implementation needed here

They want to use a language model to generate the rest of the function's code. Which of the following prompts is most likely to yield a correct, efficient, and contextually appropriate code completion?

0

1

Updated 2025-09-26

Contributors are:

Who are from:

Tags

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Evaluation in Bloom's Taxonomy

Cognitive Psychology

Psychology

Social Science

Empirical Science

Science