Logic Flashcards

1
Q

If Statement

A

var num = 5;
if(num == 5){
print(num);
}

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

If Else

A

var num = 5;
if(num == 5){
print(num);
} else {
print (“not 5”);
}

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

If Else If

A

var num = 5;
if(num == 5){
print(“Equals 5”);
}
else if(num == 4){
print(“Equals 4”);
}
else {
print(“Not 4 or 5”);
}

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

Allowed Operators

A

> <
<=
=
!=
&&

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