Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • \$\begingroup\$ If your PRNG has a very low variance (say, return 2 all the time) you may be able to omit the import. \$\endgroup\$ Commented Nov 5, 2021 at 23:29
  • \$\begingroup\$ @ceilingcat I'm not sure what you mean, the random module is the only method I'm aware of to generate reasonably uniformly random numbers in python \$\endgroup\$ Commented Nov 5, 2021 at 23:35
  • \$\begingroup\$ A "random number generator" that only returns 2 should pass all test cases. \$\endgroup\$ Commented Nov 5, 2021 at 23:46
  • 1
    \$\begingroup\$ @ceilingcat That is not random \$\endgroup\$ Commented Nov 5, 2021 at 23:47