Bird
0
0

Find the bug in this snippet for human approval:

medium📝 Debug Q7 of 15
Agentic AI - Agent Safety and Guardrails
Find the bug in this snippet for human approval:
if confidence < 0.7:
request_approval()
AIndentation missing for request_approval()
BComparison operator should be >
CFunction name is incorrect
DMissing parentheses in function call
Step-by-Step Solution
Solution:
  1. Step 1: Check indentation after if statement

    Python requires the code inside if to be indented.
  2. Step 2: Identify missing indentation

    request_approval() is not indented, causing an IndentationError.
  3. Final Answer:

    Indentation missing for request_approval() -> Option A
  4. Quick Check:

    Indent code inside if blocks [OK]
Quick Trick: Indent code inside if blocks in Python [OK]
Common Mistakes:
  • Changing comparison operator unnecessarily
  • Assuming function name is wrong
  • Forgetting parentheses in function calls

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes