Not
The NOT operator, represented by the tilde symbol (~), is used in the Nada DSL to invert or negate a boolean value. When applied to a boolean expression, the ~ operator flips its value—turning True to False and False to True.
- Nada program
- Test 1
- Test 2
src/not.py
loading...
tests/not_test_1.yaml
loading...
tests/not_test_2.yaml
loading...
Run and test the not program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run not_test_1
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test not_test_1