Looks like no one added any tags here yet for you.
What type of structure can execute a set of statements only under certain circumstance?
Decision structure
When you assign a variable, calculating it's value, and outputting a result done in a step by step manner what is that called?
Sequence structure
What type of structure provides one alternative path of execution?
Single alternative decision structure
What kind of expression has value of either True or False?
Boolean expression
What type of operators are >, <, and == ?
Relational operators
What structure tests a condition and then takes one path if the condiion is true, or another path if the condition is false?
A dual alternative decision structure
What statement is used to write a single alternative decision structure?
If statement
What statement is used to write a dual alternative decision structure?
If-else statement
What type of operator are and, or , and not?
Logical operators
What compound Boolean expression created with which operator is true only if both of its subexpressions are true?
AND operator
A compound Boolean expression created with which operator is true if either of its subexpressions is true?
OR operator
Which operator takes a Boolean expression as its operand and reverses its logical value?
NOT operator
What is a Boolean variable that signals when some condition exists in a program?
A FLAG
True or False: You can write any program using only sequence structures
FALSE: You need a decision structure and repetition structures for complex programs
True or False: A program can be made of only one type of CONTROL structure. You cannot combine structures.
FALSE: Programs often combine sequence, decision, and repetition structures
True or False: A single alternative decision structure tests a condition and then takes on path if the condition is true, or another path if the condition is false.
FALSE: A single alternative structure only takes action if the condition is true. A DUAL decision structure handles both true and false cases.
True or False: A decision structure can be nested inside another decision structure
True
True or False: A compound BOolean expression created with the "AND" operator is true only when both subexpressions are true
True
What is 'conditionally executed'?
Refers to a code that runs when a specific condition is met
You need to test a condition then execute one set of statements if the condition is true. If the condition is false, you need to execute a different set of statements. What structure will you use?
Dual alternative decision structure (if-else statement)
What is the AND operator?
The AND operator evaluates to True only if both of its subexpressions are True. If either of both subexpressions are False the result is False.
What is the OR operator?
The OR operator evaluates ti True if at least one of its subexpressions are True. It only evaluates False if all/both subexpressions are False.
When determining whether a number is inside a range, which logical operator is it best to use?
The AND operator
What is a flag and how does it work?
A Boolean variable that signals whether a certain condition exists in a program. It is typically set to True or False to indicate the status of a condition.
What is the Walrus operator?
A special symbol in Python that looks like this: :=. It's called the "walrus operator" because it kind of looks like the eyes and tusks of a walrus: :=
What does the Walrus operator do?
The walrus operator does two things at the same time:
Assigns a value to a variable (like giving a name to something).
Returns the value (so you can use it right away).
It's like saying, "Hey, give this thing a name, and let me use it right now!"
Control structure