Unit 3: Boolean Expressions and if Statements Flashcards
! (NOT) Operator
A unary operator that negates the value of a boolean expression. It returns true if the expression is false, and false if the expression is true.
&& (AND) operator
A logical operator that returns true if both of its operands are true, and false otherwise.
|| (OR) operator
A logical operator that returns true if at least one of its operands is true, and false otherwise.
Boolean Expressions
Statements that evaluate to either true or false. They are commonly used in programming to make decisions and control the flow of a program.
Boolean Logic Operators
Symbols used to perform logical operations on boolean values (true or false). They allow programmers to combine conditions and make decisions based on the result.
Boolean Statements
Expressions that can only have two possible values
Boolean values
Data types that can only have two possible values - true or false. They are often used in programming to make decisions based on certain conditions.
Branching
Refers to the ability of a program to make decisions and execute different sets of instructions based on certain conditions.
Branching Decisions
Refer to the process in programming where different paths are taken based on certain conditions or criteria. It allows the program to make decisions and execute specific blocks of code accordingly.
College Board
An organization that administers standardized tests, including the AP Computer Science A exam. They set the curriculum and create the exams for various subjects.
Combinational Logic
Refers to digital circuits where the output depends solely on the current input values. There is no memory element involved in these circuits.
Comparing Objects
Involves checking whether two objects are equal or determining their relative order. In computer science, it is done using comparison operators or methods to compare the values of specific attributes or properties.
Compound boolean statements
Logical expressions that combine multiple boolean values using logical operators such as AND, OR, and NOT. They allow us to evaluate the truth or falsehood of complex conditions.
Conditional Statements
Programming constructs that allow different actions to be taken based on whether a certain condition is true or false. They control the flow of execution in a program.
Efficient
Achieving maximum productivity with minimum wasted effort or resources. In computer science, it refers to writing code that performs tasks quickly and uses minimal memory.
Equivalent Boolean Expressions
Different logical expressions that produce the same output for all possible input combinations. In other words, they have the same truth table.
Exam Weighting
Refers to the allocation of points or marks given to each section or topic in an exam. It determines how much each part contributes to the overall score.
Flow of Program
Refers to the order in which instructions are executed in a computer program. It determines how the program progresses from one statement to another.
FRQ #1
Refers to the first free-response question in the AP Computer Science A exam. It is a coding problem that requires students to write methods and implement control structures to solve a given problem.
If-Else If-Else statements
Conditional statements that allow different blocks of code to be executed based on different conditions. They provide multiple branches for decision-making in a program.
If-Else Statements
Conditional statements used in programming to make decisions based on certain conditions. They allow different blocks of code to be executed depending on whether a condition is true or false.
Indentations and Brackets
Used in programming to organize code and indicate the scope of blocks. Indentations help visually separate different sections of code, while brackets (such as curly braces {}) define the beginning and end of a block.
<= (less than or equal to)
This term refers to a comparison operator used in programming that checks if one value is less than or equal to another value.
> (greater than)
This term refers to a comparison operator used in programming that checks if one value is greater than another value.