Which data type matches the data value True (unquoted)?

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

Which data type matches the data value True (unquoted)?

Explanation:
Booleans are used to represent true or false values. The value True, written without quotes, is a boolean literal indicating a truth value. It isn’t a string because strings must be enclosed in quotes. It isn’t a number because there are no digits to form an integer or a float. While booleans can sometimes be treated as numbers in certain contexts, the literal itself belongs to the Boolean data type, which is designed specifically for true/false values.

Booleans are used to represent true or false values. The value True, written without quotes, is a boolean literal indicating a truth value. It isn’t a string because strings must be enclosed in quotes. It isn’t a number because there are no digits to form an integer or a float. While booleans can sometimes be treated as numbers in certain contexts, the literal itself belongs to the Boolean data type, which is designed specifically for true/false values.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy