CH5 - If Statements Flashcards

1
Q

What is Python’s If statement?

A

Examines the current state of a program and respond appropriately to that state,

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

What is Python’s conditional test?

A

Uses value True or False to determine to execute the code.

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

What is (==)?

A

Checks the equal value of data.

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

What is (!=)?

A

Checks the unequal value of data.

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

What is (

A

Mathematical comparison, Less than.

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

What is (<=)?

A

Mathematical comparison, Less than or equal.

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

What is (>)?

A

Mathematical comparison, Greater than.

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

What is (>=)?

A

Mathematical comparison, Greater than or equal.

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

What is the (and) condition?

A

Checks multiple conditions. Both conditions need to be true simultaneously.

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

What is the (or) condition?

A

Checks multiple conditions. either or Both conditions need to be true.

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

How to check a value in the list?

A

Use the (in) condition.

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

How to check the value is not in the list?

A

Use the (not) condition.

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

What is a Boolean value?

A

Is either true or false.

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

What is the (else) block?

A

Is a catch-all statement.

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