Chapter 3 Fundamentals of Computing

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/26

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

27 Terms

1
New cards

What type of structure can execute a set of statements only under certain circumstance?

Decision structure

2
New cards

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

3
New cards

What type of structure provides one alternative path of execution?

Single alternative decision structure

4
New cards

What kind of expression has value of either True or False?

Boolean expression

5
New cards

What type of operators are >, <, and == ?

Relational operators

6
New cards

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

7
New cards

What statement is used to write a single alternative decision structure?

If statement

8
New cards

What statement is used to write a dual alternative decision structure?

If-else statement

9
New cards

What type of operator are and, or , and not?

Logical operators

10
New cards

What compound Boolean expression created with which operator is true only if both of its subexpressions are true?

AND operator

11
New cards

A compound Boolean expression created with which operator is true if either of its subexpressions is true?

OR operator

12
New cards

Which operator takes a Boolean expression as its operand and reverses its logical value?

NOT operator

13
New cards

What is a Boolean variable that signals when some condition exists in a program?

A FLAG

14
New cards

True or False: You can write any program using only sequence structures

FALSE: You need a decision structure and repetition structures for complex programs

15
New cards

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

16
New cards

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.

17
New cards

True or False: A decision structure can be nested inside another decision structure

True

18
New cards

True or False: A compound BOolean expression created with the "AND" operator is true only when both subexpressions are true

True

19
New cards

What is 'conditionally executed'?

Refers to a code that runs when a specific condition is met

20
New cards

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)

21
New cards

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.

22
New cards

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.

23
New cards

When determining whether a number is inside a range, which logical operator is it best to use?

The AND operator

24
New cards

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.

25
New cards

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: :=

26
New cards

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!"

27
New cards

Control structure