Bird
0
0

Given the code below, what will be the output?

medium📝 Command Output Q13 of 15
Agentic AI - Agent Observability
Given the code below, what will be the output?
def log_call(tool, result):
    print(f"Calling {tool}...")
    print(f"Result: {result}")

log_call('BackupTool', 'Success')
ACalling BackupTool... Result: Success
BCalling BackupTool...\nResult: Success
CCalling tool...\nResult: result
DError: Missing parentheses in print
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the function calls

    The function prints two lines: one with tool name, one with result.
  2. Step 2: Substitute arguments and check output

    Calling 'BackupTool' and 'Success' prints exactly two lines with those values.
  3. Final Answer:

    Calling BackupTool...\nResult: Success -> Option B
  4. Quick Check:

    Print lines match arguments [OK]
Quick Trick: Read print lines carefully and substitute variables [OK]
Common Mistakes:
  • Confusing variable names with strings
  • Expecting output on one line
  • Thinking print syntax is wrong

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes