Week 6 Making Decisions Flashcards

1
Q

What is the syntax for greater than or equal to?

A

> =

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

How are bools stored in memory

A

As a 0 for false, and any non zero number is true

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

What is the skeleton for a if statement

A

if keyword (condition - boolean expression) {

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

When are braces not needed

A

If there is only one line of code in the block to be executed (Do it anyway)

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

what is the ==

A

comparison operator

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

how many items does short circuit evaluation use when it is evaluating expressions that have the || operator?

A

If one or more expressions are true, all are true.

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