# Flowgorithm Logical Operators

# Overview

In this tutorial, we will learn about Flowgorithm logical operators. Logical operators work on boolean operands. We can combine multiple conditions into a single boolean result. We can combine multiple conditional expressions using the operators.

## Logical Operators

The Flowgorithm Logical operators are as follows:

Logical
| Operator Symbol | Description |

Logical AND | &&, AND, ∧ | The AND operator is a binary operator. It requires two boolean conditional expressions that should be evaluated to be either True or False.The Logical |

Logical OR | ||, OR, ∨ | The Logical OR operator is also a binary operator. It requires two boolean conditional expressions that should be evaluated to be either True or False.The Logical OR returns False If both the conditions are False. Otherwise, it will return True. |

Logical NOT | !, NOT, ¬ | The Logical NOT operator is a unary operator. It requires only one boolean conditional expression.The Logical NOT negates the given condition. It will return True if the condition is False. It will return False if the condition is True. |

## Example

Sample flowchart to demo logical operators:

## Common Errors

## Syntax Error

AND and OR conditional operators are binary operators. The operators require two boolean conditional expressions to evaluate the compound truth value. We get syntax errors if we omit or don’t supply two conditional expressions.

The AND operator requires two conditional expressions. In this example, the programmer supplied only one expression which results in an error.

## Type Mismatch Error

The conditional operators operate on Boolean data types. The conditional expressions should have Boolean results i.e either True or False. In this example, the programmer is trying to use String datatypes along with conditional operators. This would result in a *Type Mismatch* error. The fix is to remove the quotes in the expressions.

For example, *“age > 18”* enclosed within double quotes is a String data type in Flowgorithm and not a conditional expression.

—

**Flowgorithm Tutorials**

Flowgorithm flowchart tutorials on this website:

https://www.testingdocs.com/flowgorithm-flowchart-tutorial/

**Flowgorithm Website**

For more information on the Flowgorithm tool, please visit the official website at: