Bird
0
0

Consider the following Python code:

medium📝 Command Output Q4 of 15
Agentic AI - Agent Observability
Consider the following Python code:
def log_tool_call(tool_name, status):
    print(f"Executing {tool_name}...")
    print(f"Status: {status}")

log_tool_call('DeployScript', 'Completed')

What will be printed when this code runs?
AExecuting DeployScript... Status: Completed
BExecuting tool_name... Status: status
CExecuting DeployScript Status Completed
DExecuting DeployScript... Status Completed
Step-by-Step Solution
Solution:
  1. Step 1: Analyze print statements

    The f-string prints variable values with the exact formatting.
  2. Step 2: Match output

    Output includes 'Executing DeployScript...' and 'Status: Completed' on separate lines.
  3. Final Answer:

    Executing DeployScript... Status: Completed -> Option A
  4. Quick Check:

    f-strings print variables as shown [OK]
Quick Trick: f-strings print variables with exact formatting [OK]
Common Mistakes:
  • Ignoring the ellipsis (...) in the string
  • Confusing variable names with literal strings
  • Missing the colon in 'Status:'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes