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
gulaghasi [49]
3 years ago
10

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.
length.py
def return_random_int(lower_bound, upper_bound):
Computers and Technology
1 answer:
evablogger [386]3 years ago
7 0

Answer:

import random

def return_random_int(lower_bound, upper_bound):

   return random.randrange(lower_bound, upper_bound)

   

print(return_random_int(3, 8))

Explanation:

Import the random module

Create a function called return_random_int takes two parameters, lower_bound and upper_bound

Return a number between <em>lower_bound</em> and <em>upper_bound</em> using random.range()

Call the function with given inputs, and print the result

You might be interested in
// Marian Basting takes in small sewing jobs.
Len [333]

Answer:

start

  Declarations

     num weddingMonth

     num weddingDay

     string weddingClientName

     num weddingPhoneNum

     string weddingDescription

     num weddingPrice

    num replaceMonth

     num replaceDay

     string replaceClientName

     num replacePhoneNum

     string replaceDescription

     num replacePrice

     num weddingDate

     num replaceDate

     num bothAtEnd=0

    num END_YEAR=9999

     InputFile weddingFile

     InputFile replaceFile

    ouputFile mergedFile

getReady()

while bothAtEnd<>1

mergeRecords()

  endwhile

  finishUp()

stop

getReady()

  open weddingFile "weddingDress.dat"

  open replaceFile "replaceJacketZipper.dat"

  open mergedFile “Merged.dat”

   readWedding()

  readreplace()

  checkEnd()

return

readWedding( )

     input weddingMonth,weddingDay,weddingClientName,weddingPhoneNum,weddingDescription,weddingPricee from weddingFile

while eof

 weddingDate=END_YEAR

endwhile

return

readreplace( )

     input replaceMonth,replaceDay,replaceClientName,replacePhoneNum,replaceDescription,replacePricee from replaceFile

while eof

 replaceDate=END_YEAR

endwhile

return

checkEnd()

if weddingDate=END_YEAR

if replaceDate=END_YEAR

bothAtEnd=1

endif

endif

return

mergedFile()

if weddingDate<replaceDate

         output weddingMonth,weddingDay,weddingClientName,weddingPhoneNum,weddingDescription,weddingPricee to weddingFile

readWedding()

endif

      output replaceMonth,replaceDay,replaceClientName,replacePhoneNum,replaceDescription,replacePricee to replaceFile

readreplace()

return

finishUp()

close weddingFile

close replaceFile

close mergedFile

return

6 0
3 years ago
1. Which markup language adds the ability to use video without requiring the user to download add-ons?
aniked [119]

HTML5

HTML5 has fewer plug-ins like the ability to standardize how audio and video are presented on a Web page. It introduces the <video> element designed to remove the need to install 3rd party add-ons and plug-ins like adobe flash player. It also adds the <audio> element  too that allows pages to smoothly add audio files.

3 0
3 years ago
Which is a type of display monitor? HDD CPU SSD LCD
Alex787 [66]

Answer:

LCD

Explanation:

LCD, also known as a Liquid Crystal Display, is a type of panel used in displays like monitors and TV's. SSD's are storage devices, CPU's are processing units, and HDD's are also storage devices.

4 0
3 years ago
What is the role of consumers in determining what is produced in a market economy
gregori [183]

Consumer preferences and resource scarcity determine which goods are produced and in what quantity; the prices in a market economy act as signals to producers and consumers who use these price signals to help make decisions.

(i got this from google btw)

hope this helped :) pls give branliest

3 0
4 years ago
Read 2 more answers
How can I master the computer organization ​
inn [45]

Answer:

This course qualitatively and quantitatively examines computer design trade-offs, teaches the fundamentals of computer architecture and organization, including CPU, memory, registers, arithmetic unit, control unit, and input/output components.

Explanation:

it can be difficult. For me it was one of the most challenging classes but also one of the my most interesting ones. You gain an understanding of what occurs at 7 different layers of abstraction (similar in theory to the OSI model used in networking but different). It can be hard

7 0
2 years ago
Other questions:
  • How long does it take a letter to arrive?
    9·1 answer
  • What are some causes of the number of bytes on the wire exceeding the number of bytes being captured?
    6·2 answers
  • Diane wants to maintain a record of percent change in sales from the year 2000 to the present year. She enters the values of per
    10·1 answer
  • Most sim cards allow ___________ access attempts before locking you out.
    10·1 answer
  • What are the principles for computer programming?<br> Please add some examples
    8·1 answer
  • Explain how software is distinct from hardware.
    8·2 answers
  • Power point presentation make use of pages known as
    9·2 answers
  • Mobile cameras are now of a higher quality than when they first arrived on the market. Describe the difference in
    5·1 answer
  • 100POINTS!!!!
    9·2 answers
  • Most presentations use text:
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!