QuestionQ71

VerifiedControl Structures and Iteration

Which of the following is displayed when this program is run using a Python interpreter?

Question Image

Explanation

A nonzero integer is truthy in Python, including -10. Therefore, the if branch executes and print(a) outputs -10.

Community Discussion

No comments yet. Be the first to start the discussion!