Code.org Computer Science Discoveries Practice Test

Access More Questions
What are boolean values in programming?
Correct Answer:
True and false values used in conditions
Explanation:
Boolean values are true or false, and they’re what let programs make decisions. When you test a condition in an if statement or a loop, the result is either true (the condition is met) or false (it isn’t). Those true/false results come from comparisons like 5 > 3 or 2 == 2, and from combining statements with and, or, and not. This true/false information tells the program which path to take or whether to keep repeating a block. Booleans are a distinct type in many languages, separate from numbers or text, though some languages also treat other values as true or false in a broader sense (truthy or falsy).

Access more questions from this quiz

Continue to Code.org Computer Science Discoveries Practice Test for more practice questions and the full quiz experience.

Access More Questions