PT0-002 · Question #327
Given the following script: Which of the following describes True?
The correct answer is C. A Boolean operator. In programming, True (and its counterpart False) is a Boolean literal - a value of the Boolean data type. Boolean operators/values represent one of two states: true or false. Although True frequently appears inside while loops (e.g., while True:) or conditionals (e.g., if…
Question
Given the following script:
Which of the following describes True?
Options
- AA while loop
- BA conditional
- CA Boolean operator
- DAn arithmetic operator
How the community answered
(25 responses)- A4% (1)
- B4% (1)
- C92% (23)
Explanation
In programming, True (and its counterpart False) is a Boolean literal - a value of the Boolean data type. Boolean operators/values represent one of two states: true or false. Although True frequently appears inside while loops (e.g., while True:) or conditionals (e.g., if True:), the value True itself is classified as a Boolean operator/value, not as the loop or conditional construct that uses it. It is not an arithmetic operator, which would perform mathematical computations.
Topics
Community Discussion
No community discussion yet for this question.