Exercise 7: Relational and Logical Operators
Explore how to use relational and logical operators in R programming. This lesson helps you understand how to test conditions and display results using the cat function, enabling you to write code that evaluates whether values meet specific criteria and produce true or false outputs.
We'll cover the following...
We'll cover the following...
Problem Statement
Check whether the given test variable is greater than and less than .
Use
cat()to display the output on the screen.
Input
A testVariable containing the number being tested.
Output
TRUE or FALSE depending on whether the number satisfies the condition or not.
Sample Input
19
Sample Output
FALSE
Test Yourself
Write your code in the given area. If you get stuck, you can look at the solution.