Skip to content
sanya_fritz edited this page Mar 23, 2024 · 1 revision

Documentation for the Random class

This class provides methods for generating random numbers of various types.

Methods

  • randint(int min, int max): Generates a random integer within the specified range.

    • Parameters:
      • min: The minimum value of the range (inclusive).
      • max: The maximum value of the range (inclusive).
    • Returns: A random integer in the range from min to max.
  • randbool(): Generates a random boolean value (true or false).

    • Returns: A random boolean value.
  • randdouble(double min, double max): Generates a random floating-point number within the specified range.

    • Parameters:
      • min: The minimum value of the range.
      • max: The maximum value of the range.
    • Returns: A random floating-point number in the range from min to max.

Clone this wiki locally