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
Vikentia [17]
3 years ago
8

What expressions will initialize d with a random value such that all possible values for d are given by the inequality 1.5 ≤ d &

lt; 7.5?
Computers and Technology
1 answer:
Kaylis [27]3 years ago
7 0

Answer:

The solution code is written in Python

d = 1.5 + random.random() * 6

Explanation:

By presuming the Python random module is imported, we can use the <em>random</em> method to generate a random number.  <em>random.random()</em> will give us a value in the range [0, 1). The ensure the lower limit is 1.5 instead of 0, we can add 1.5 to random.random()

  •      1.5 + random.random()

This expression will give any value in range [1.5, 2.5)

To ensure the upper limit is set to 7.5, we tweak the previous expression to

  • 1.5 + random.random() * 6  

This expression will always multiply a random number from [0,1) with 6 and then only added with 1.5. This will always produce a random number that fulfill the inequality 1.5 ≤ d < 7.5

You might be interested in
In a singing competition, there are 34 more men than women
djverab [1.8K]

Answer:

94 women are there

Explanation:

it is easy subtraction you only have to 128-34

4 0
4 years ago
Read 2 more answers
joe is in the planning stages to make sure that an upcoming company promotion during a major sporting event will not overwhelm h
VikaD [51]

The possible solutions to recommend are that Vertical scaling, Horizontal scaling, Cloud bursting

The cloud computing business model is based on a utilitarian business model, which charges you solely for the resources you use. With this strategy, you may scale your cloud fleet to suit its present workload and add and subtract capacity as needed. Variability may be used to scale cloud services in a variety of ways, including vertical and horizontal scaling and bursting. Horizontal scaling in cloud computing refers to adding more instances rather than switching to a bigger instance size. Vertical scaling involves the addition of more or faster CPUs, memory, or I/O resources to an existing server or the replacement of one server by a more physical server.

Learn more about the utility business model here: brainly.com/question/28668154brainly.com/question/29349562

#SPJ4

3 0
2 years ago
How many passes will it take to find the five in this list?
Savatey [412]

Answer:

1 im prety sure

Explanation:

5 0
3 years ago
Read 2 more answers
What message did vera mukhina convey in her work entitled the worker and the collective farmworker?
Dominik [7]

Answer:

She glorified the communal labor of the Soviet people

3 0
1 year ago
i give up on understanding and trying to pass science. ive now started clicking random letters as the choices. i actually got a
Rzqust [24]
Um okay, that's not a question so why even post it.
7 0
3 years ago
Other questions:
  • Vanessa and Marie are best friends. Vanessa tells Marie that one of their classmates has been posting nasty comments about Vanes
    10·2 answers
  • Which type of spreadsheet cell represents the left hand sides (lhs) formulas in an optimization analysis?
    5·1 answer
  • Explain 5 service provided by Internet​
    6·1 answer
  • Why is ssh preferred over telnet for remote connections?
    10·1 answer
  • You are tasked with leading a project to build a custom software testing tool for client. You have been provided with a set of p
    7·1 answer
  • To make a black and white image out of a color image, you would use which option?
    7·1 answer
  • An example of hardware is a(n) _____.
    9·2 answers
  • Use a for/else loop to traverse through the key names in the dictionary below in order to find Mr. Potatohead’s mailing address.
    7·1 answer
  • Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?
    6·1 answer
  • BRAINLIEST TO RIGHT ANSWER!! TIMED QUIZ HELP ASAP PLS!!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!