Skip to main content

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.

src/addition_public.py
loading...

Run and test the addition_public program

1. Open "Nada by Example"

Open in Gitpod

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.

src/addition_public_unsigned.py
loading...

Run and test the addition_public_unsigned program

1. Open "Nada by Example"

Open in Gitpod

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.

src/public_conditional.py
loading...

Run and test the public_conditional program

1. Open "Nada by Example"

Open in Gitpod

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