Public
The Public data type is used for inputs that are not sensitive and can be shown in the clear during computation. These input values are visible to the program.
PublicInteger
PublicInteger
represents a user input public integer value. This value can be a negative integer, a positive integer, or zero.
- Nada program
- Test file
src/addition_public.py
loading...
tests/addition_public_test.yaml
loading...
Run and test the addition_public program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run addition_public_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test addition_public_test
PublicUnsignedInteger
PublicUnsignedInteger
represents a user input public unsigned integer value. This value can be zero or a positive integer.
- Nada program
- Test file
src/addition_public_unsigned.py
loading...
tests/addition_public_unsigned_test.yaml
loading...
Run and test the addition_public_unsigned program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run addition_public_unsigned_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test addition_public_unsigned_test
PublicBoolean
PublicBoolean
represents a user input public boolean value. This value can be true or false.
- Nada program
- Test file
src/public_conditional.py
loading...
tests/public_conditional_test.yaml
loading...
Run and test the public_conditional program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run public_conditional_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test public_conditional_test