Answer
For the maximum value of 40, we get no repetitions.
Work Step by Step
$\textbf{Note}$: I am using the numbers generated in part (a) of exercise 1.1
After changing the maximum value to 20, the numbers generated are
14 7 8 10 1 3 14 7 19 15 (Numbers 14, 7 is repeated)
Maximum value = 30
15 24 13 2 19 24 27 30 21 4 (Number 24 is repeated)
Maximum value = 40
25 21 13 9 12 30 28 7 15 31 (No number is repeated)