← Quiz: Modules and Libraries: all 14 questions
Quiz: Modules and Libraries · Question 12 of 14
Why do programs call random.seed(1) while testing?
Why do programs call random.seed(1) while testing?
- A.To make the numbers more random
- B.To get the same "random" numbers on every run
- C.To install the random module
- D.To pick numbers only from 1 upward
Answer & explanation
Correct answer: To get the same "random" numbers on every run
A fixed seed makes results repeatable, which helps when checking output.
Can you get the rest right without peeking?
Take the timed Quiz: Modules and Libraries quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →