76.7k views
15 votes
1 2

3 4

Question #4

Multiple Choice

Which statement is true about the random and secrets modules?

O Only the secrets module can generate random numbers.

O Both modules can generate random numbers.

Neither module can generate random numbers.

O Only the random module can generate random numbers.

User Pinturic
by
3.5k points

2 Answers

2 votes

Answer:

Neither module can generate random numbers.

Step-by-step explanation:

Because I took the quiz and that's the right answer.

User Behnam Rasooli
by
2.9k points
13 votes

Answer:

Both modules can generate random numbers.

Step-by-step explanation:

Both the random and secrete modules are builtin programming modules used for generating random number variables. The random module consists of a number of methods in its module for random. number generation such as seed() ; getstate() ; random() ; choice() ; randrange() ; randint() and so on. Random methids are best for generating random numbers which are to be adopted for simulation or modeling. The secrete modules does the same however, numbers generated are stronger and less predictable than the random number modules. Secrete modules are usually adopted in the generation of authentication token and security pins.

User Bill Healey
by
3.4k points