Ask Question
2 May, 13:46

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

+5
Answers (1)
  1. 2 May, 17:46
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers