Site Title
Fun Conditionals Quiz!!
JavaScript Conditionals Quiz
- Which of the following is the comparison operator for ‘strict equality’ in JavaScript?
- Which logical operator checks if both conditions are true?
- What will be the result of this expression:
5 < 8 && 7 > 6
?
- When is the
else
block executed in JavaScript?
- (a) When the
if
condition is true
- (b) When the
if
condition is false
- (c) When the
else if
condition is true
- What does this statement do:
if (x > 10 && y < 5)
?
- (a) It checks if both
x
is greater than 10 and y
is less than 5
- (b) It checks if either
x
is greater than 10 or y
is less than 5
- (c) It will always return
true
```
Python Conditionals Quiz
- Which of the following is the relational operator for ‘greater than’?
- Which logical operator checks if both conditions are true?
- What will be the result of this expression:
5 < 8 and 7 > 6
?
- When is the
else
block executed?
- (a) When the
if
condition is true
- (b) When the
if
condition is false
- (c) When the
elif
condition is true
- What does this statement do:
if x > 10 and y < 5:
?
- (a) It checks if both
x
is greater than 10 and y
is less than 5
- (b) It checks if either
x
is greater than 10 or y
is less than 5
- (c) It will always return True