What data type does the unquoted value True have?

Study for the End of Year 8 Computer Science Test. Prepare with flashcards and multiple choice questions, each with hints and explanations. Get ready for your exam!

Multiple Choice

What data type does the unquoted value True have?

Explanation:
A boolean. The unquoted value True is a boolean literal, representing a truth value used in logic and control flow. It isn’t a string because strings are written with quotes, and it isn’t a number because booleans are a separate type from integers or floats. Booleans have two possible values—true and false—and they’re used to decide which paths a program should take in conditional statements. In many languages, you can use booleans directly in conditions, and in some contexts they can interact with numbers, but their fundamental type is Boolean.

A boolean. The unquoted value True is a boolean literal, representing a truth value used in logic and control flow. It isn’t a string because strings are written with quotes, and it isn’t a number because booleans are a separate type from integers or floats. Booleans have two possible values—true and false—and they’re used to decide which paths a program should take in conditional statements. In many languages, you can use booleans directly in conditions, and in some contexts they can interact with numbers, but their fundamental type is Boolean.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy