I'm looking for a way to give out students an exercise that contain lists with randomly elements for each student (in python 3),
I would like to know how can we create test cases to check their submissions automatically?
I'm still new in Coderunner so I'm not familiar with all the settings and how to implemet Coderunner in Moodle.
For example :
each student get a list with random numbers
so we want then to implement sum of the numbers and print them out:
Thank you very much
CodeRunner randomisation is explained here. I'm not sure that your example warrants randomisation, however. If you're asking students to write a function or a program that adds a sequence of numbers, I'd suggest you just set up a number of tests with any suitable arbitrary data and make sure that at least one of the tests is hidden.
Randomisation is usually used to make it harder for students to copy code. If they're writing code that sums the given data, it'll work correctly regardless of the input data you give them - giving different students different data won't stop the copied code from working.
thank you very mutch