Child pages
  • Additional Custom Expression Examples
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Example: Indicate if a number is "Even", "Odd", and "Unknown".

Use a variable to record the set of numbers you wish to use. Then set variables to mark the points at which the number is considered odd or even. Finally, use two if (cond, trueValue, falseValue) blocks to return the "Odd", "Even" or "Unknown" text based on the number value.

n%2==0 shows if the number is divisible by 2 with no remainder. This is an "Even" number

 

 

n%2 !=0 shows if the number is divided by 2 does have a remainder than the number is "Odd"

n=[Average: WB1];
if( n%2==0,
 "Even",
 if (n% 2 != 0,
 "Odd",
 "Unknown"
 )
)
 

 

 

 

 

  • No labels