Ask Question
22 January, 12:08

Which of the following expressions will produce a valid random integer between the int values m and n inclusive, where m < n?

+1
Answers (1)
  1. 22 January, 15:57
    0
    The solution code is written in Python:

    m = 1

    n = 5

    d = random. randint (m, n)

    Explanation:

    To get a random integer between m and n inclusive, we can make use of Python randint method. It will take two parameters, m and n. By giving two integers as an input (e. g. 1 and 5) to randint, it will generate a random integer between 1 to 5 inclusive.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which of the following expressions will produce a valid random integer between the int values m and n inclusive, where m < n? ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers