Skip to main content

Literals

Literals are constant values defined within the program rather than provided by a party.

Integer

Integer represents a literal integer value. This value can be a negative integer, a positive integer, or zero.

src/addition_literal.py
loading...

Run and test the addition_literal program

1. Open "Nada by Example"

Open in Gitpod

2. Run the program with inputs from the test file

nada run addition_literal_test

3. Test the program with inputs from the test file against the expected_outputs from the test file

nada test addition_literal_test

UnsignedInteger

UnsignedInteger represents a literal unsigned integer value. This value can be zero or a positive integer.

src/addition_literal_unsigned.py
loading...

Run and test the addition_literal_unsigned program

1. Open "Nada by Example"

Open in Gitpod

2. Run the program with inputs from the test file

nada run addition_literal_unsigned_test

3. Test the program with inputs from the test file against the expected_outputs from the test file

nada test addition_literal_unsigned_test

Boolean

Boolean represents a literal boolean value defined within the program rather than provided by a party. This value can be true or false.

src/literal_boolean.py
loading...

Run and test the literal_boolean program

1. Open "Nada by Example"

Open in Gitpod

2. Run the program with inputs from the test file

nada run literal_boolean_test

3. Test the program with inputs from the test file against the expected_outputs from the test file

nada test literal_boolean_test