Bird
0
0

Which of the following is the correct way to represent an AGI agent's safety check in pseudocode?

easy📝 Syntax Q12 of 15
Agentic AI - Future of AI Agents
Which of the following is the correct way to represent an AGI agent's safety check in pseudocode?
Awhile safety_check() = True: continue_agent()
Bif safety_check() == False: stop_agent()
Cif safety_check() != False then stop_agent()
Dif safety_check() == False then continue_agent()
Step-by-Step Solution
Solution:
  1. Step 1: Analyze safety check logic

    The agent should stop if the safety check fails (returns False).
  2. Step 2: Match correct syntax and logic

    if safety_check() == False: stop_agent() correctly uses equality check and stops the agent if safety_check() is False.
  3. Final Answer:

    if safety_check() == False: stop_agent() -> Option B
  4. Quick Check:

    Stop if safety fails = if safety_check() == False: stop_agent() [OK]
Quick Trick: Stop agent when safety_check is False [OK]
Common Mistakes:
  • Using assignment '=' instead of comparison '=='
  • Confusing True and False conditions
  • Incorrect syntax like 'then' in Python

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes