Chapter 3 Flashcards

1
Q

Control Structure

A

Logical design that controls order in which set of statements execute.

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

Sequence Structure

A

Set of statements that execute in the order they appear.

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

Decision Structure/ Selection Structure

A

Specific action(s) perform only if a condition exists.

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

Single Alternative Decision Structure

A

Provides only one alternative path of execution.

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

Boolean Expression

A

Expression tested by if statement to determine if it is true or false.

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

Relational Operator

A

Determines whether a specific relationship exists between two values.

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

Dual Alternative Decision Structure

A

Two possible paths of execution.

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

How are strings compared?

A

By looking at the ASCII values for each individual character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
What would the following code display?
if ‘z’ < ‘a’:
	print(‘z is less than a’)
else:
	print(‘z is not less than a’)
A

z is not less than a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
What would the following code display?
s1 = ‘New York’
s2 = ‘Boston’
if s1 > s2:
	print(s2)
	print(s1)
else:
	print(s1)
	print(s2)
A

New York is greater than Boston

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

Logical Operators

A

Operators that can be used to create complex Boolean expressions.

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

Short Circuit Evaluation

A

Deciding the value of a compound Boolean expression after evaluating only one sub expression.

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

Boolean Variable

A

References on of two values, True or False.

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