QUESTION IMAGE
Question
question # 3
multiple choice
what function in the secrets module can generate random integers between one and 30, including the possibility of both one and 30.
secrets.random(30)
secrets.randbelow(30)
secrets.randbelow(31)
secrets.random(30)
The secrets.randbelow(n) function generates a random integer in the range [0, n - 1). To get integers in the range [1, 30], we need to use secrets.randbelow(31) and then add 1 (but among the given options without the addition - step, secrets.randbelow(31) gives numbers from 0 to 30 which can be adjusted to the desired range). There is no secrets.random() function as shown in the options.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
secrets.randbelow(31)