In these cases simply running the program, with given outputs, produces the desired results. The problem is that in that case we cannot simply insert the program in the same way as we would with function definitions. We need to instead "evaluate" it for each test separately.
Alternatively: automatically place the program as the body of a function, then call the function in the tests.
In these cases simply running the program, with given outputs, produces the desired results. The problem is that in that case we cannot simply insert the program in the same way as we would with function definitions. We need to instead "evaluate" it for each test separately.
Alternatively: automatically place the program as the body of a function, then call the function in the tests.