Relational Operators & Selection Structures Flashcards

1
Q

What is an operand?

A

The variable in a line of code.

Example: test = x + y (x and y are the operand)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an operator?

A

Describes what action is going to be peformed.

Example: test = x + y ( = and + are operators)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do operands in a comparison need to be?

A

They need to be of the same data type. Numeric to Numeric or Strings to Strings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Boolean

A

A Boolean value is either True or False

Example:
x = True
y = False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Equivalency Operator

A

”=” evaluates a operands as equal. Usually seen as “ = = “ to avoid confusion with assignment operator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a selection structure?

A

Used to make a decision or comparison, then decides what path.

Typically deciding whether the statement is true of false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Compound condition

A

Where you need to ask multiple questions in a selection structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly