Random numbers are different every run, unless you set the seed. This is Practice: Random Number Generation as a program the tests can check.

The program reads a whole number from the Input tab. Use it as the seed with set.seed(), then:

  1. Print 5 numbers sampled without replacement from 1 to 10 with sample(1:10, 5).
  2. Print 2 letters sampled from letters.

Print each with print(). Then run it twice with the same seed and confirm you get identical output, and once with a different seed.

Remove the set.seed() line and run it a few times. Why would the tests fail?

You do not have permission to attempt this activity.