The shell provides a great opportunity to test how things work, either the new ones or those you might have forgotten, or things whose working principle you just don't know for sure. For this task, let's experiment a bit with the random module and two of its methods: seed() and choice().
Experiment with it:
- What will be the result if we run
random.choice()with the argument[1, 2, 3, 4, 5]? - And if we run it with the same argument several times more?
- Now, what if we run
random.seed(1)before we runrandom.choice()? - And if we run it several times again, but this time initialize
random.seed(1)each time before callingchoice()?
Write the number you get in the last experiment in the field below.