I am developing an assignment server, where students can upload their program solutions. It should work wither several programming languages. For testing the programs I am executing a shell script and passing the test-cases and file as arguments like that:
printf '10\n3\n+\n' | ./eval_python steps.py
Its working, that's not the problem. For the output I am getting something like that:
running python script with shell script:
$ How much steps? Step size? Counting up (+) or down (-) ? Step 0: 3
$ Step 1: 6
$ Step 2: 9
$ Step 3: 12
$ Step 4: 15
$ [..]
This format makes evaluation quite difficult and also maybe confuse students, because they don't see the inputs (when you run the python script from shell, the output looks like in the example below). For the evaluation the difficulty is, the students must not name their inputs like in this solution, it would be also okay if they just ask Steps? instead of How much steps? .
running python script directly from shell:
$ How much steps? 10
$ Step size? 3
$ Counting up (+) or down (-)? +
$ Step 0: 3
$ Step 1: 6
$ Step 2: 9
$ Step 3: 12
$ Step 4: 15
$ [..]
Is there a way to combine the inputs in the output? Or maybe other ideas how I can solve this problems?
Thanks a lot!
python steps.py "10\n" "3\n" "+\n"?python steps.py, and the scripts asks the user for input withsteps = input('How many steps').