Skip to main content

If / Else (Ternary)

If / Else with a public condition

src/if_else_public.py
loading...

Run and test the if_else_public program

1. Open "Nada by Example"

Open in Gitpod

2. Run the program with inputs from the test file

nada run if_else_public_test

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

nada test if_else_public_test

If / Else with a private condition

src/if_else_private.py
loading...

Run and test the if_else_private program

1. Open "Nada by Example"

Open in Gitpod

2. Run the program with inputs from the test file

nada run if_else_private_test

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

nada test if_else_private_test