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
Arada [10]
3 years ago
6

In the function below, use a function from the random module to return a random integer between the given lower_bound and upper_

bound, inclusive. Don't forget to import the random module (before the function declaration). For example return_random_int(3, 8) should random return a number from the set: 3, 4, 5, 6, 7, 8 The whole point of this question is to get you to read the random module documentation.

Computers and Technology
1 answer:
sladkih [1.3K]3 years ago
6 0

Answer:

import random

def ran(lower_bound, upper_bound):

   return random.randrange(lower_bound, upper_bound)

print(ran(3, 8))

Explanation:

The programming language used is python.

Modules are imported using the import keyword. In the first line the random module is imported.

A function ran is defined and it has two parameters, lower and upper bound that wll be passed to the function from random module.

The random module is a module that is used to generate random numbers, it is a very common module in programming, some of the popular functions in the module are random.randint and random.randrange. There are several other functions but these are the most common. the randint(a, b) takes two arguments and returns a random integer between the two arguments.

randrange(start, stop, step); It can take up to three arguments but has only compulsory argument that must be given for it not to generate an error and that is the stop.

when only the stop is defined, it assumes the start as zero and creates a range from 0 - stop and returns a random number within that range.

When start and stop arguments are given, it returns a number within the range of start - stop.

Start and stop must be given for there to be a step, if the step is given, it means the array containing the range of numbers will skip a step after each number.

The program makes use of the random.randrange(start, stop) and the upper and lower bounds are passed as its arguments.

Finally, the function is called and its return value is printed to the screen.

You might be interested in
. Alex discovered a bunch of SATA drives in a box at the office and needs to check the contents. What can he do so that Windows
ZanzabumX [31]

You have to make sure the BIOS boot is set to the normal hard drive first, then plug in the SATA cable and power properly

8 0
3 years ago
A three-tier design includes a middle layer between the client and server that processes the client requests and translates them
devlian [24]

Answer:

a. True

Explanation:

The three tiers in a three-tier architecture are:

Presentation Tier: Occupies the top level and displays information related to services available on a website. This tier communicates with other tiers by sending results to the browser and other tiers in the network.

Middle Tier: Also called the application tier, logic tier, business logic or logic tier, this tier is pulled from the presentation tier. It controls application functionality by performing detailed processing.

Data Tier: Houses database servers where information is stored and retrieved. Data in this tier is kept independent of application servers or business logic.

5 0
3 years ago
Choose all that apply.
stiks02 [169]

Answer:

choose all that apply

Explanation:

7 0
3 years ago
Please help me with Excel!!! A lot of points!
yaroslaw [1]

Answer:

=((SUM(PUT RANGE OF MOTHLY EXPENSES HERE)*12)+SUM(PUT RANGE OF YEARLY EXPENSES HERE))/12

Explanation:

Adds all of the Monthly Expenses : SUM(PUT RANGE OF MOTHLY EXPENSES HERE)

Multiplies the result by 12: *12

Then adds all of the Yearly Expenses to the product of Steps 1 and 2 : SUM(PUT RANGE OF YEARLY EXPENSES HERE)

Divides this new sum by 12: /12

=((SUM(PUT RANGE OF MOTHLY EXPENSES HERE)*12)+SUM(PUT RANGE OF YEARLY EXPENSES HERE)/12)

6 0
3 years ago
Tools used to build a bridge<br>​
Sati [7]

Aerial Lifts,

Vertical Masts and Hydro Platforms,

Telehandlers,

Excavators,

Skid Loaders,

Backhoes,

Cranes,

Air Compressors.

If It was helpful, can you make me brainliest please?

6 0
2 years ago
Other questions:
  • Ben works at a top accounting firm in Salt Lake City and his responsibilities include developing individual and departmental goa
    9·1 answer
  • How can I use the internet/social media to protect my identity?
    14·1 answer
  • Which of the following is the best definition of being a “digital citizen”?
    6·2 answers
  • Fill in the blanks to make the factorial function return the factorial of n. Then, print the first 10 factorials (from 0 to 9) w
    6·1 answer
  • Who like the videos where is clown is from :)
    6·1 answer
  • An entrepreneur identifies and fills the gap between what the society needs and what is available is called​
    5·1 answer
  • Help Me<br><br> What are the four types of graphic models?
    10·1 answer
  • In which of the following movies, multimedia's special effect is used ? *
    8·2 answers
  • A ____ is someone who develops programs and apps or writes the instructions that direct the computer or mobile device to process
    8·1 answer
  • In order to see what the services status will be in a given runlevel, you would use what command?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!