Module 06 - Conditonals Flashcards

1
Q

What is a boolean expression?

A

Math operation that executes to only two answers: TRUE or FALSE

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

What do you use to calculate an exponent?

A

*

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

What do you use to calculate the remainder after division?

A

%

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

What is abs()?

A

Returns the positive value of a number

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

What is max()?

A

The highest integer value in a set of data

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

What is min()?

A

The lowest integer value in a set of data

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

What is int()?

A

A function or operation that converts a value to an integer
(EX: print(int[false, true, 10.3, 9.8])); // 0, 1, 10, 9)

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

Will a conditional statement not happen if it’s false?

A

True

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

What is a conditional statement?

A

It directs the flow of your program after checking the result of a boolean expression

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

What is a IF statement?

A

IF code block is something you do/execute if a condition is TRUE

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

What is boolean?

A

TRUE or FALSE

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

What are relational operators?

A

Used to compare values and determine the relationship between them

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

What is >?

A

Greater than

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

What is <?

A

Less than

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

What is ===?

A

Is it equal to

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

What is >=?

A

Greater than or equal to

17
Q

What is <=?

A

Less than or equal to

18
Q

What is !==?

A

Is the number not equal to

19
Q

What is an ELSE statement?

A

Else block is executed only when the IF condition is FALSE

20
Q

Where does the ELSE block go in a conditional expression?

A

At the very end of the expression

21
Q

What is ELSE IF?

A

Executed if a boolean expression is FALSE and another boolean expression is TRUE

22
Q

When you combine two boolean values w/ && the result is true. What is it?

A

AND

23
Q

When you combine two boolean values w/||, the result is true when both operands (value/variables) are true & false otherwise. What is it?

A

OR

24
Q

What is NOT (!)?

A

If the expression is originally true, applying ‘!’ makes it false, and if the expression is originally false, applying ‘!’ makes it true

25
Q

true && true =

A

true

26
Q

true && false =
false && true =
false && false =

A

false

27
Q

true || true =
true || false =
false || true =

A

true

28
Q

false || false =

A

false

29
Q

!true =

A

false

30
Q

!false =

A

true