PCAP Certified Associate In Python Programming Exam [python]

Access More Questions
A programmer wants to write a script to check for a specific error condition. The program should print 'Error Found' only if `error_code` is not 0 AND `is_critical` is True. Which of the following conditional statements accomplishes this?
Correct Answer:
if error_code != 0 and is_critical: print("Error Found")

Access more questions from this quiz

Continue to PCAP Certified Associate in Python Programming Exam [python] for more practice questions and the full quiz experience.

Access More Questions