1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Doss [256]
3 years ago
5

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

Computers and Technology
1 answer:
White raven [17]3 years ago
8 0

Answer:

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 <em>randint </em>method. It will take two parameters, <em>m</em> and <em>n</em>. 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.

You might be interested in
A city government is attempting to reduce the digital divide between groups with differing access to computing and the Internet.
sergeinik [125]

Answer:

C

Explanation:

Putting all government forms on the city web site is the least activity likely to be effective in the purpose of reducing digital divide.

Holding basic computer classes at the community centers will very much help to reduce the digital divide.

Providing free wireless internet connections at locations in low-income neighborhood will also reduce the gap of digital divide

Requiring that every city school has computers that meet a minimum hardware and software will made computing resources available to users thereby reducing digital divide.

5 0
3 years ago
What programming language has dominated scientific computing over the past 60 years?
lord [1]

c++,  because it is considered as the mother of all programming languages. you can easily access other programming languages if you have a command on c++

7 0
2 years ago
Calculate the voltage between two points of the circuit of an iron through which a current of 4 amps passes and presents a resis
Varvara68 [4.7K]

def voltage_calculation (i, r):

return i*r

3 0
3 years ago
Can anyone tell me what wrong with this code the instructions are "Currently, this program will add 6 and 3 together, output the
atroni [7]

Answer:

import random

a = random.randint(1,10)

b = random.randint(1,10)

answer = a * b

print(str(b)+" * "+str(a)+" = "+str(answer))

Explanation: So I am guessing you are on Edhesive Module 2.5 Intro to cs. Sorry it took so long but hopefully this works.

4 0
4 years ago
Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will rea
irinina [24]

Answer:

Check the explanation

Explanation:

Executable Code:

def all_permutations(permList, nameList):

   # Define the function to create a list

   # of all the permutations.

   def createPermutationsList(nameList):

       # Compute and store the length of the list.

       n = len(nameList)

       # Return an empty list if the size is 0.

       if n == 0:

           return []

       # Return the element if the size is 1.

       if n == 1:

           return [nameList]

       # Create an empty list to store the permutations.

       permList = []

       # Start the loop to traverse the list.

       for i in range(n):

           # Store the first element of the current list.

           first = nameList[i]

           # Compute the store the remaining list.

           remaining = nameList[:i] + nameList[i+1:]

           # Start the loop and call the function recursively

           # with the remaining list.

           for perm in createPermutationsList(remaining):

               # Append the element in the permutation list.

               permList.append([first] + perm)

       # Return the permutation list.

       return permList

   # Call the function to compute the permutation list

   # and store the result.

   permList = createPermutationsList(nameList)

   # Start the loop to display the values.

   for perm in permList:

       for val in perm:

           print(val, end = " ")

       print()

# Call the main() function.

if __name__ == "__main__":

   # Prompt the user to enter the input.

   nameList = input().split(' ')

   permList = []

   # Call the function to create and output

   # the permutations of the list.

   all_permutations(permList, nameList)

#endcode

3 0
3 years ago
Other questions:
  • Who is affected by electronuc theft of a song ?
    14·2 answers
  • Choose the sentences that describe techniques of formatting text.
    12·1 answer
  • 1. When centering one paragraph on a page of text, the user needs to _____.
    15·2 answers
  • Which of the following topics should you avoid bringing up during a college interview?
    10·2 answers
  • In a proper webpage, which tag holds all of a webpages visble HTML
    12·2 answers
  • PLEASE VERY IMPORTANT Conduct research on graphic design skills in your area and explore the different courses that they offer l
    12·1 answer
  • You can access a button s screentip by _____.
    6·1 answer
  • Help me to write spaghetti stack function, please!!
    11·1 answer
  • Watson Studio is the IBM premier integrated development environment for data science and artificial intelligence practitioners.
    5·1 answer
  • Need help plz 100 POINTS
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!