What statements can execute a set of statements only under certain circumstances?

focusNode

Didn't know it?
click below

Knew it?
click below

What statements can execute a set of statements only under certain circumstances?

Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Introduction to Programming Chapter 04 - Terms

TermDefinition
Decision Structure (function) A decision structure (AKA selection structure) allows a program to perform actions only under certain conditions.
NOT operator Takes a Boolean expressions as its operand and reverses its logical value.
Short-Circuit Evaluation AND: If the expression to the left of the operand is false, right side is not checked. OR: If the expression to the left of the operand is true, right side is not checked.
OR operator Takes two Boolean expressions as operands and creates a compound Boolean expression that is true when either of the subexpressions is true.
&& AND operator
| | OR operator
!. NOT operator
AND operator Takes two Boolean expressions as its operand and creates a compound Boolean expression that is true only when both subexpressions are true.
Case Structure (AKA) Multiple Alternative Decision Structure
Case Structure (function) Allows you to test the value of a variable or an expression and then use that value to determine which statement or set of statements to execute.
Decision Structure (AKA) Selection Structures
conditionally executed performed only when a certain condition is true.
Single Alternative Decision Structure Provides only one alternative path.
You can use Decision Statements alone to create a complete program? T/F False
If Clause The program line that begins with IF
condition Any expression that can be evaluated as either true or false. AKA Boolean Experssion
Boolean Expressions Expressions that can be evaluated as either true or false.
Relational Operator (function) Determines whether a specific relationship exists between two values.
Relational Operators (examples) > < >= <= == !=
Which relationship operators test for more than one relationship? <= >=
== a relational operator that determines whether the operand on its left is equal to the operand on its right.
Why are two == used? To differentiate between the relational operator and the assignment operator.
Control Structure A logical design that controls the order in which a set of statements executes.
Dual Alternative Decision Structures Two possible paths of execution. One path if TRUE, Another path if FALSE.
What statement do you use in pseudocode to express dual alternative decision structure. If - Else
String Comparisons are case sensitive in most programming languages. T/F True
Nested Decision Structures A decision structure can be nested inside another decision structure to test more than one condition.
If - Then - Else - If statement a simpler way logically to write a nested decision structure.
testExpression The first line of a case structure following Select
Multiple Alternative Decision Structure (AKA) Case Structure
Multiple Alternative Decision Structure (function) Allows you to test the value of a variable or an expression and then use that value to determine which statement or set of statements to execute.
Logical Operators (examples) And Or Not
Logical Operators (function) Allow you to create complex Boolean expressions.
Which Logical Operator would you use to determine whether a numeric value is within a specific range or our of a specific range? AND
Boolean Variable Can hold one of two values: true or false
Which variable is commonly used as a flag? Boolean
What are the four types of variables we've learned so far? Integer Real String Boolean


{"ad_unit_id":"App_Resource_Sidebar_Upper","resource":{"id":27995250,"author_id":10559046,"title":"Chapter 4 (Decision Structures and Boolean Logic)","created_at":"2020-12-13T21:29:47Z","updated_at":"2020-12-15T02:36:37Z","sample":false,"description":null,"alerts_enabled":true,"cached_tag_list":"vocabulary, textbook","deleted_at":null,"hidden":false,"average_rating":null,"demote":false,"private":false,"copyable":true,"score":4,"artificial_base_score":0,"recalculate_score":false,"profane":false,"hide_summary":false,"tag_list":["vocabulary","textbook"],"admin_tag_list":[],"study_aid_type":"FlashCardDeck","show_path":"/flash_card_decks/27995250","folder_id":33767957,"public_author":{"id":10559046,"profile":{"name":"Andrew Lewis8450","about":null,"avatar_service":"google","locale":"en-US","google_author_link":null,"user_type_id":156,"escaped_name":"Andrew Lewis","full_name":"Andrew Lewis","badge_classes":""}}},"width":300,"height":250,"rtype":"FlashCardDeck","rmode":"canonical","sizes":"[[[0, 0], [[300, 250]]]]","custom":[{"key":"rsubject","value":"Computer Science"},{"key":"env","value":"production"},{"key":"rtype","value":"FlashCardDeck"},{"key":"rmode","value":"canonical"},{"key":"sequence","value":1},{"key":"uauth","value":"f"},{"key":"uadmin","value":"f"},{"key":"ulang","value":"en"},{"key":"ucurrency","value":"usd"}]}

{"ad_unit_id":"App_Resource_Sidebar_Lower","resource":{"id":27995250,"author_id":10559046,"title":"Chapter 4 (Decision Structures and Boolean Logic)","created_at":"2020-12-13T21:29:47Z","updated_at":"2020-12-15T02:36:37Z","sample":false,"description":null,"alerts_enabled":true,"cached_tag_list":"vocabulary, textbook","deleted_at":null,"hidden":false,"average_rating":null,"demote":false,"private":false,"copyable":true,"score":4,"artificial_base_score":0,"recalculate_score":false,"profane":false,"hide_summary":false,"tag_list":["vocabulary","textbook"],"admin_tag_list":[],"study_aid_type":"FlashCardDeck","show_path":"/flash_card_decks/27995250","folder_id":33767957,"public_author":{"id":10559046,"profile":{"name":"Andrew Lewis8450","about":null,"avatar_service":"google","locale":"en-US","google_author_link":null,"user_type_id":156,"escaped_name":"Andrew Lewis","full_name":"Andrew Lewis","badge_classes":""}}},"width":300,"height":250,"rtype":"FlashCardDeck","rmode":"canonical","sizes":"[[[0, 0], [[300, 250]]]]","custom":[{"key":"rsubject","value":"Computer Science"},{"key":"env","value":"production"},{"key":"rtype","value":"FlashCardDeck"},{"key":"rmode","value":"canonical"},{"key":"sequence","value":1},{"key":"uauth","value":"f"},{"key":"uadmin","value":"f"},{"key":"ulang","value":"en"},{"key":"ucurrency","value":"usd"}]}

Which structure can execute a set of statements only under certain circumstances?

Decision structure executes a set of statements under certain conditions.

What executes statements only when a certain condition is met?

The IF statement lets you execute a sequence of statements conditionally. That is, whether the sequence is executed or not depends on the value of a condition. There are three forms of IF statements: IF-THEN , IF-THEN-ELSE , and IF-THEN-ELSIF .

Which structure causes a statement or set of statements to execute repeatedly?

A repetition structure causes a statement or set of statements to execute repeatedly. Repetition structures are used to perform the same task over and over. A condition-controlled loop uses a Boolean (true/false) condition to control the number of times that it repeats.

What is meant by the term conditionally executed?

6 CONDITIONAL EXECUTION. Conditional execution controls whether or not the core will execute an instruction. Most instructions have a condition attribute that determines if the core will execute it based on the setting of the condition flags.