Skip to content

OR

Download Flojoy Studio to try this app
Takes two boolean data type and computs logical OR operation on them. Params: default : Boolean The input boolean to which we apply the OR operation. a : Boolean The input boolean to which we apply the OR operation. Returns: out : Boolean The boolean result from the operation of the inputs.
Python Code
from flojoy import flojoy, Boolean


@flojoy
def OR(default: Boolean, a: Boolean) -> Boolean:
    """Takes two boolean data type and computs logical OR operation on them.

    Parameters
    ----------
    default : Boolean
        The input boolean to which we apply the OR operation.
    a : Boolean
        The input boolean to which we apply the OR operation.

    Returns
    -------
    Boolean
        The boolean result from the operation of the inputs.
    """
    if default.b or a.b:
        return Boolean(b=True)
    return Boolean(b=False)

Find this Flojoy Block on GitHub

Example App

Having problems with this example app? Join our Discord community and we will help you out!
React Flow mini map

In this example, BOOLEAN node generates true and BOOLEAN1 node generates false.

Apply OR operation and it returns true.

Visualize the result using TEXT_VIEW node.