Conditionals Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the difference between programming operators (&&, ||, !) and English operators (and, or, not)?

A

Programming operator have higher presedence than english operators.

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

What is the main purpose of English operators?

A

Sever as control flow of logic like the if modifier.

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

What is short-circuit evaluation?

A

It is an evaluation strategy in which the second argument is evaluated only if the first argument does not suffice to determine the value of the expression.

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

How does the short-circuit evaluation work?

A

For the AND function if the first argument is evaluated to false all the expression is false. In the OR function, if the first argument is true, all the expression is true.

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