Professional Documents
Culture Documents
Department of Education
LOGICAL OPERATORS
Week 3
3. What operators either change the value of a boolean expression or combine two
boolean expressions?
5. What is a tale that shows the possible outcomes of two expressions joined by a
logical operator?
LEARNING ACTIVITY WORKSHEETS
Grade 12 – Programming NC III
Q2 - Week 3
MELC: Demonstrate using Decision constructs in accordance with Java framework.
TLE_ICTJAVA11-12POAD-IIf-i-29
(Government Property. Not for sale)
Page 2 of 4
LEARNING ACTIVITY WORKSHEETS
Grade 12 – Programming NC III
ACTIVITY 4 Write an IF Statement. (10 points)
Directions: Write the following IF statements. Write your answers on the space
provided.
1. Write an if statement that displays the message "The number is valid." if the
variable speed is within the range 0 through 200.
2. Write an if-else statement that displays the message "The number is not valid." if
the variable speed is outside the range 0 through 200.
3. Write an if-else statement that displays the message “The number is valid.” if the
variable temperature is within the range 50 through 150.
4. Write an if-else statement that displays the message “The number is not valid.” if
the variable hours is outside the range 0 through 80.
5. Write an if statement that displays the message “Valid number.” if the variable
number is equal 6 or not greater than 3.
Q2 - Week 3
MELC: Demonstrate using Decision constructs in accordance with Java framework.
TLE_ICTJAVA11-12POAD-IIf-i-29
(Government Property. Not for sale)
Page 3 of 4
LEARNING ACTIVITY WORKSHEETS
Grade 12 – Programming NC III
ACTIVITY 5 Short Answer. (15 points)
Direction: Write your answers on the space provided.
1. Define Logical AND operator and explain its truth table.
Q2 - Week 3
MELC: Demonstrate using Decision constructs in accordance with Java framework.
TLE_ICTJAVA11-12POAD-IIf-i-29
(Government Property. Not for sale)
Page 4 of 4